Skip to content

Commit aef8d0b

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

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
@@ -38,7 +38,7 @@ export function isDevMode(): boolean {
3838
export function enableProdMode(): void {
3939
// The below check is there so when ngDevMode is set via terser
4040
// `global['ngDevMode'] = false;` is also dropped.
41-
if (typeof ngDevMode === undefined || !!ngDevMode) {
41+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
4242
global['ngDevMode'] = false;
4343
}
4444
}

0 commit comments

Comments
 (0)