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 ddef448 commit aef8d0b
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 @@ -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.