Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ivy): reordering how root is acquired #25470

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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