fix(ivy): prevent ngDevMode from getting removed too early (#25371)

PR Close #25371
This commit is contained in:
Miško Hevery 2018-08-07 17:01:27 -07:00 committed by Kara Erickson
parent 8bbce3feff
commit b64fed1ba3
1 changed files with 3 additions and 3 deletions

View File

@ -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();
}