diff --git a/src/util/root.ts b/src/util/root.ts index 4b0eaea29f..1faf5ffbe3 100644 --- a/src/util/root.ts +++ b/src/util/root.ts @@ -18,7 +18,7 @@ declare module NodeJS { } } -export var root = (objectTypes[typeof window] && window) || this; +export var root:any = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window); var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;