FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(core): set `ngDevMode` to `false` when calling `enableProdMode()` by alan-agius4 · Pull Request #40124 · angular/angular · GitHub

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .ts  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 9 additions & 0 deletions packages/core/src/util/is_dev_mode.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/

import {global} from './global';

/**
* This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.
*
Expand Down Expand Up @@ -44,5 +46,12 @@ export function enableProdMode(): void {
if (_runModeLocked) {
throw new Error('Cannot enable prod mode after platform setup.');
}

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

_devMode = false;
}

Back | FazBrowse Home | New Git URL