fix(ivy): add typeof guard around ngDevMode for instances where we cannot set it in Node (#25475)

PR Close #25475
This commit is contained in:
Ben Lesh 2018-08-13 19:39:18 -07:00
parent fb2c5241fc
commit 1bb30147d3
1 changed files with 4 additions and 2 deletions

View File

@ -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;
/**