mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Do not redefine __asyncValues if it already exists (#20460)
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 #20408.
This commit is contained in:
committed by
Mohamed Hegazy
parent
7de8c6bcaa
commit
e3a20e7f0a
@@ -968,7 +968,7 @@ namespace ts {
|
||||
name: "typescript:asyncValues",
|
||||
scoped: false,
|
||||
text: `
|
||||
var __asyncValues = (this && this.__asyncIterator) || function (o) {
|
||||
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator];
|
||||
return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator]();
|
||||
|
||||
Reference in New Issue
Block a user