Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit922f492

Browse files
alan-agius4alxhub
authored andcommitted
fix(core): setngDevMode tofalse when callingenableProdMode() (#40124)
The `ngDevMode` description also mentions that calling `enableProdMode` will set this the value to `false`.https://github.com/angular/angular/blob/4610093c87975b6355f31a9c849351129908783a/packages/core/src/util/ng_dev_mode.ts#L22 which is currently not the case.PRClose#40124
1 parent0aa220b commit922f492

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎packages/core/src/util/is_dev_mode.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import{global}from'./global';
10+
911
/**
1012
* This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.
1113
*
@@ -44,5 +46,12 @@ export function enableProdMode(): void {
4446
if(_runModeLocked){
4547
thrownewError('Cannot enable prod mode after platform setup.');
4648
}
49+
50+
// The below check is there so when ngDevMode is set via terser
51+
// `global['ngDevMode'] = false;` is also dropped.
52+
if(typeofngDevMode===undefined||!!ngDevMode){
53+
global['ngDevMode']=false;
54+
}
55+
4756
_devMode=false;
4857
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp