diff --git a/goldens/size-tracking/aio-payloads.json b/goldens/size-tracking/aio-payloads.json index c9869baede..0f3cb254a5 100755 --- a/goldens/size-tracking/aio-payloads.json +++ b/goldens/size-tracking/aio-payloads.json @@ -12,7 +12,7 @@ "master": { "uncompressed": { "runtime-es2015": 3033, - "main-es2015": 447975, + "main-es2015": 447349, "polyfills-es2015": 52493 } } diff --git a/goldens/size-tracking/integration-payloads.json b/goldens/size-tracking/integration-payloads.json index a06f63162e..9022471479 100644 --- a/goldens/size-tracking/integration-payloads.json +++ b/goldens/size-tracking/integration-payloads.json @@ -3,7 +3,7 @@ "master": { "uncompressed": { "runtime-es2015": 1485, - "main-es2015": 141516, + "main-es2015": 140921, "polyfills-es2015": 36964 } } diff --git a/packages/core/src/application_ref.ts b/packages/core/src/application_ref.ts index 5f833bbdda..519d3af218 100644 --- a/packages/core/src/application_ref.ts +++ b/packages/core/src/application_ref.ts @@ -597,7 +597,6 @@ export class ApplicationRef { private _bootstrapListeners: ((compRef: ComponentRef) => void)[] = []; private _views: InternalViewRef[] = []; private _runningTick: boolean = false; - private _enforceNoNewChanges: boolean = false; private _stable = true; private _onMicrotaskEmptySubscription: Subscription; @@ -626,8 +625,6 @@ export class ApplicationRef { private _exceptionHandler: ErrorHandler, private _componentFactoryResolver: ComponentFactoryResolver, private _initStatus: ApplicationInitStatus) { - this._enforceNoNewChanges = isDevMode(); - this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({ next: () => { this._zone.run(() => { @@ -764,7 +761,9 @@ export class ApplicationRef { for (let view of this._views) { view.detectChanges(); } - if (this._enforceNoNewChanges) { + // Note that we have still left the `isDevMode()` condition in order to avoid + // creating a breaking change for projects that still use the View Engine. + if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) { for (let view of this._views) { view.checkNoChanges(); }