fix: don’t rely on `goog.DEBUG` but on `COMPILED` instead

`good.DEBUG` can also be true when using advanced compilation.

Attention: This change has be applied in G3 already as a local mod!
This commit is contained in:
Tobias Bosch 2017-09-28 18:33:18 -07:00 committed by Alex Rickabaugh
parent 30d5a2ca83
commit db74f44a97
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ export function dashCaseToCamelCase(input: string): string {
* @param value The value to export.
*/
export function exportNgVar(name: string, value: any): void {
if (typeof goog === 'undefined' || goog.DEBUG) {
if (typeof COMPILED === 'undefined' || !COMPILED) {
// Note: we can't export `ng` when using closure enhanced optimization as:
// - closure declares globals itself for minified names, which sometimes clobber our `ng` global
// - we can't declare a closure extern as the namespace `ng` is already used within Google