From db74f44a97b545488c4e05bf4210dfb733fe8d6f Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 28 Sep 2017 18:33:18 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20don=E2=80=99t=20rely=20on=20`goog.DEBUG`?= =?UTF-8?q?=20but=20on=20`COMPILED`=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `good.DEBUG` can also be true when using advanced compilation. Attention: This change has be applied in G3 already as a local mod! --- packages/platform-browser/src/dom/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/platform-browser/src/dom/util.ts b/packages/platform-browser/src/dom/util.ts index 6a0ea7b7e4..7f5b18cb6a 100644 --- a/packages/platform-browser/src/dom/util.ts +++ b/packages/platform-browser/src/dom/util.ts @@ -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