From 0428a85bad9404b30bf8307b62b4f1ff76af4e36 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Fri, 11 Sep 2015 11:23:04 -0700 Subject: [PATCH] fix(root): use self as the root object when available --- src/util/root.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;