Skip to content

Add null check when querying for exported from a module#2642

Merged
mhegazy merged 1 commit into
masterfrom
getExportsForModuleNullCheck
Apr 6, 2015
Merged

Add null check when querying for exported from a module#2642
mhegazy merged 1 commit into
masterfrom
getExportsForModuleNullCheck

Conversation

@mhegazy
Copy link
Copy Markdown
Contributor

@mhegazy mhegazy commented Apr 6, 2015

Fixes #2629

@mhegazy mhegazy changed the title Use sys.newLine in transpile when possible Add null check when querying for exported from a module Apr 6, 2015
Comment thread src/compiler/checker.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the check on the initial symbol; none of the others should ever be undefined, should they?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we later on call visit(resolveExternalModuleName(node, (<ExportDeclaration>node).moduleSpecifier)); and that can be undefined if the module is empty. see my second test case.

@DanielRosenwasser
Copy link
Copy Markdown
Member

👍

mhegazy added a commit that referenced this pull request Apr 6, 2015
Add null check when querying for exported from a module
@mhegazy mhegazy merged commit 189f07a into master Apr 6, 2015
@mhegazy mhegazy deleted the getExportsForModuleNullCheck branch April 6, 2015 23:16
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullRef on processing 'export *' in several cases

3 participants