Skip to content

Commit

Permalink
fix(ivy): reordering how root is acquired (#25470)
Browse files Browse the repository at this point in the history
PR Close #25470
  • Loading branch information
benlesh committed Aug 14, 2018
1 parent 4a4d6fb commit 97d8b5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/core/src/render3/ng_dev_mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ declare global {

declare let global: any;

// NOTE: The order here matters: Checking window, then global, then self is important.
// checking them in another order can result in errors in some Node environments.
const __global: {ngDevMode: NgDevModePerfCounters | boolean} =
typeof window != 'undefined' && window || typeof self != 'undefined' && self ||
typeof global != 'undefined' && global;
typeof window != 'undefined' && window || typeof global != 'undefined' && global ||
typeof self != 'undefined' && self;

export function ngDevModeResetPerfCounters(): NgDevModePerfCounters {
// Make sure to refer to ngDevMode as ['ngDevMode'] for clousre.
Expand Down

0 comments on commit 97d8b5e

Please sign in to comment.