Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default aliasing bug fix #4829

Merged
merged 3 commits into from
Sep 17, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
style nits
  • Loading branch information
weswigham committed Sep 17, 2015
commit f3062c59fded3c23d7523b8879b6f997489665ef
5 changes: 3 additions & 2 deletions src/compiler/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1517,9 +1517,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
write(getGeneratedNameForNode(<ImportDeclaration>declaration.parent.parent.parent));
var name = (<ImportSpecifier>declaration).propertyName || (<ImportSpecifier>declaration).name;
var identifier = getSourceTextOfNodeFromSourceFile(currentSourceFile, name);
if (languageVersion == ScriptTarget.ES3 && identifier === "default") {
if (languageVersion === ScriptTarget.ES3 && identifier === "default") {
write(`["default"]`);
Copy link
Member

Choose a reason for hiding this comment

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

Just use single quotes.

Copy link
Member Author

Choose a reason for hiding this comment

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

But that would fail the linter.

Copy link
Member Author

Choose a reason for hiding this comment

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

On that note, we should consider merging #4458 at some point.

} else {
}
else {
write(".");
write(identifier);
}
Expand Down