diff --git a/lib/zone.ts b/lib/zone.ts index 3a3c6a349..3b5b2fd37 100644 --- a/lib/zone.ts +++ b/lib/zone.ts @@ -1950,7 +1950,6 @@ const Zone: ZoneType = (function(global: any) { detectZone.runTask(detectZone.scheduleMacroTask('detect', detectRunFn, null, () => null, null)); detectZone.runTask( detectZone.scheduleMacroTask('detect', detectRunWithoutNewFn, null, () => null, null)); - NativeError.stackTraceLimit = nativeStackTraceLimit; function handleDetectError(error: Error) { let frames = error.stack ? error.stack.split(/\n/) : []; @@ -2118,6 +2117,7 @@ const Zone: ZoneType = (function(global: any) { detectEmptyZone.runGuarded(detectPromiseCaughtWithoutNewFn); detectZoneWithCallbacks.runGuarded(detectPromiseCaughtWithoutNewFn); + NativeError.stackTraceLimit = nativeStackTraceLimit; return global['Zone'] = Zone; })(typeof window === 'object' && window || typeof self === 'object' && self || global);