Skip to content

Commit

Permalink
fix(ivy): add typeof guard around ngDevMode for instances where we ca…
Browse files Browse the repository at this point in the history
…nnot set it in Node
  • Loading branch information
benlesh committed Aug 14, 2018
1 parent fb2c524 commit e8219a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/core/src/render3/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down

0 comments on commit e8219a2

Please sign in to comment.