We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54e4ac9 commit 32ff988Copy full SHA for 32ff988
src/common/common.ts
@@ -7,7 +7,8 @@
7
import {isFunction, isString, isArray, isRegExp, isDate} from "./predicates";
8
import { all, any, not, prop, curry } from "./hof";
9
10
-let angular = (<any> window).angular || {};
+let w: any = typeof window === 'undefined' ? {} : window;
11
+let angular = w.angular || {};
12
export const fromJson = angular.fromJson || JSON.parse.bind(JSON);
13
export const toJson = angular.toJson || JSON.stringify.bind(JSON);
14
export const copy = angular.copy || _copy;
0 commit comments