First in UMD global wins

Fixes #9771
This commit is contained in:
Ryan Cavanaugh committed 2016-08-26 08:49:43 -07:00
1 parent c72f5e28e8
commit 0116abdcf2
5 files changed
+103 -1

No files matched your search

+7 -1
View File
@@ -18763,7 +18763,13 @@ namespace ts {
(augmentations || (augmentations = [])).push(file.moduleAugmentations);
}
if (file.symbol && file.symbol.globalExports) {
mergeSymbolTable(globals, file.symbol.globalExports);
// Merge in UMD exports with first-in-wins semantics (see #9771)
const source = file.symbol.globalExports;
for (const id in source) {
if (!(id in globals)) {
globals[id] = source[id];
}
}
}
});