Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 63b42bd

Browse files
unframeworkbtford
authored andcommitted
fix: prevent aliasing original window reference
1 parent 7b4fdde commit 63b42bd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: zone.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
(function (window) {
3+
(function (exports) {
44

55
var zone = null;
66

@@ -86,7 +86,7 @@ Zone.prototype = {
8686
var oldZone = zone,
8787
result;
8888

89-
window.zone = zone = this;
89+
exports.zone = zone = this;
9090

9191
try {
9292
this.beforeTask();
@@ -99,7 +99,7 @@ Zone.prototype = {
9999
}
100100
} finally {
101101
this.afterTask();
102-
window.zone = zone = oldZone;
102+
exports.zone = zone = oldZone;
103103
}
104104
return result;
105105
},
@@ -669,14 +669,14 @@ Zone.onEventNames = Zone.eventNames.map(function (property) {
669669
});
670670

671671
Zone.init = function init () {
672-
window.zone = zone = new Zone();
672+
exports.zone = zone = new Zone();
673673
Zone.patch();
674674
};
675675

676676

677677
Zone.init();
678678

679-
window.Zone = Zone;
679+
exports.Zone = Zone;
680680

681681
}((typeof module !== 'undefined' && module && module.exports) ?
682682
module.exports : window));

0 commit comments

Comments
 (0)