Skip to content

Commit 0428a85

Browse files
committed
fix(root): use self as the root object when available
1 parent ca42a32 commit 0428a85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/root.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ declare module NodeJS {
1818
}
1919
}
2020

21-
export var root = (objectTypes[typeof window] && window) || this;
21+
export var root:any = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window);
2222

2323
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
2424
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;

0 commit comments

Comments
 (0)