Skip to content

Commit 2c46b5a

Browse files
alan-agius4alxhub
authored andcommitted
fix(core): correctly check for typeof of undefined in ngDevMode check (#47480)
Previously, this check was wrong as typeof returns a string. PR Close #47480
1 parent d22976a commit 2c46b5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/util/is_dev_mode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function enableProdMode(): void {
4949

5050
// The below check is there so when ngDevMode is set via terser
5151
// `global['ngDevMode'] = false;` is also dropped.
52-
if (typeof ngDevMode === undefined || !!ngDevMode) {
52+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
5353
global['ngDevMode'] = false;
5454
}
5555

0 commit comments

Comments
 (0)