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 d22976a commit 2c46b5ab24e209381bca70d875bf0e98a2846ef5
Showing 1 changed file with 1 addition and 1 deletion.
@@ -49,7 +49,7 @@ 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 2c46b5a

Please sign in to comment.