diff --git a/packages/core/src/render3/definition.ts b/packages/core/src/render3/definition.ts index ead1db96c9..b332bcdb15 100644 --- a/packages/core/src/render3/definition.ts +++ b/packages/core/src/render3/definition.ts @@ -19,8 +19,10 @@ import {CssSelectorList, SelectorFlags} from './interfaces/projection'; const EMPTY: {} = {}; const EMPTY_ARRAY: any[] = []; -ngDevMode && Object.freeze(EMPTY); -ngDevMode && Object.freeze(EMPTY_ARRAY); +if (typeof ngDevMode !== 'undefined' && ngDevMode) { + Object.freeze(EMPTY); + Object.freeze(EMPTY_ARRAY); +} let _renderCompCount = 0; /**