fix(ivy): prevent ngDevMode from getting removed too early (#25371)
PR Close #25371
This commit is contained in:
parent
8bbce3feff
commit
b64fed1ba3
|
@ -41,8 +41,8 @@ const __global: {ngDevMode: NgDevModePerfCounters | boolean} =
|
|||
typeof window != 'undefined' && window || typeof self != 'undefined' && self ||
|
||||
typeof global != 'undefined' && global;
|
||||
|
||||
export function ngDevModeResetPerfCounters() {
|
||||
__global.ngDevMode = {
|
||||
export function ngDevModeResetPerfCounters(): NgDevModePerfCounters {
|
||||
return __global.ngDevMode = {
|
||||
firstTemplatePass: 0,
|
||||
tNode: 0,
|
||||
tView: 0,
|
||||
|
@ -75,5 +75,5 @@ export function ngDevModeResetPerfCounters() {
|
|||
* as much early warning and errors as possible.
|
||||
*/
|
||||
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
||||
ngDevModeResetPerfCounters();
|
||||
__global.ngDevMode = ngDevModeResetPerfCounters();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue