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

Previously, this check was wrong as typeof returns a string.
  • Loading branch information
alan-agius4 committed Sep 19, 2022
1 parent a192c2d commit 85a8210
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 85a8210

Please sign in to comment.