Skip to content

Commit 4883c70

Browse files
authored
support firstGlobalProp on instance (#2283)
1 parent d762870 commit 4883c70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/extras/global.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// safari unpredictably lists some new globals first or second in object order
1010
var firstGlobalProp, secondGlobalProp, lastGlobalProp;
11-
function getGlobalProp () {
11+
function getGlobalProp (useFirstGlobalProp) {
1212
var cnt = 0;
1313
var foundLastProp, result;
1414
for (var p in global) {
@@ -19,7 +19,7 @@
1919
return p;
2020
if (foundLastProp) {
2121
lastGlobalProp = p;
22-
result = systemJSPrototype.firstGlobalProp && result || p;
22+
result = useFirstGlobalProp && result || p;
2323
}
2424
else {
2525
foundLastProp = p === lastGlobalProp;
@@ -64,7 +64,7 @@
6464
// when multiple globals, we take the global value to be the last defined new global object property
6565
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did
6666
// note in Edge, deleting and re-adding a global does not change its ordering
67-
var globalProp = getGlobalProp();
67+
var globalProp = getGlobalProp(this.firstGlobalProp);
6868
if (!globalProp)
6969
return emptyInstantiation;
7070

0 commit comments

Comments
 (0)