Skip to content

Commit

Permalink
fix(core): correctly check for typeof of undefined in ngDevMode c…
Browse files Browse the repository at this point in the history
…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 2c46b5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/util/is_dev_mode.ts
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2c46b5a

Please sign in to comment.