mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): remove ng when invoking enableProdMode
This was caught while investigating a leak.
(cherry picked from commit cb5879f566)
This commit is contained in:
committed by
Jessica Janiuk
parent
99b10e45d2
commit
492b10686b
@@ -40,5 +40,8 @@ export function enableProdMode(): void {
|
||||
// `global['ngDevMode'] = false;` is also dropped.
|
||||
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
||||
global['ngDevMode'] = false;
|
||||
// The ngGlobal might already be init, for because initNgDevMode() is invoked from the top level,
|
||||
// an this function might executed later. So we need to clean up the global.ng as well.
|
||||
global['ng'] = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user