Skip to content
Permalink
Browse files
fix(core): correctly check for typeof of undefined in ngDevMode c…
…heck (#47480)

Previously, this check was wrong as typeof returns a string.

PR Close #47480
  • Loading branch information
alan-agius4 authored and alxhub committed Sep 23, 2022
1 parent ddef448 commit aef8d0bb020931e0b44e067b074a449fc66f6ff7
Showing 1 changed file with 1 addition and 1 deletion.
@@ -38,7 +38,7 @@ export function isDevMode(): boolean {
export function enableProdMode(): void {
// The below check is there so when ngDevMode is set via terser
// `global['ngDevMode'] = false;` is also dropped.
if (typeof ngDevMode === undefined || !!ngDevMode) {
if (typeof ngDevMode === 'undefined' || ngDevMode) {
global['ngDevMode'] = false;
}
}

0 comments on commit aef8d0b

Please sign in to comment.