Do not redefine __asyncValues if it already exists#20460
Merged
mhegazy merged 1 commit intomicrosoft:masterfrom Jan 4, 2018
Merged
Do not redefine __asyncValues if it already exists#20460mhegazy merged 1 commit intomicrosoft:masterfrom
mhegazy merged 1 commit intomicrosoft:masterfrom
Conversation
mhegazy
reviewed
Dec 4, 2017
| var asyncValues = { | ||
| name: "typescript:asyncValues", | ||
| scoped: false, | ||
| text: "\n var __asyncValues = (this && this.__asyncIterator) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator];\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\n };\n " |
Contributor
There was a problem hiding this comment.
do not change files in lib\* these are generated as part of the build. please remove these from the PR.
Contributor
Author
There was a problem hiding this comment.
Removed all changes to the generated files in lib\*. Thanks for the hint.
The emitted declaration for the __asyncValues variable checked for the global property __asyncIterable instead of its actual declared name __asyncValues. Now the __asyncValues variable is not redefined if it is already present as global variable. This commit fixes issue microsoft#20408.
d60b64d to
c4b6714
Compare
Contributor
|
thanks @martinhiller ! and sorry for the delay. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The emitted declaration for the __asyncValues variable checked for the global property __asyncIterable instead of its actual declared name __asyncValues.
Now the __asyncValues variable is not redefined if it is already present as global variable.
Fixes #20408.