From fe563d87ba257e070c132d79bb5159c9c5d6adda Mon Sep 17 00:00:00 2001
From: Tajima Junpei
Date: Mon, 25 Jun 2012 11:32:56 +0900
Subject: [PATCH] for Closure Compiler "advanced" mode, add `moment` as a
global object via a string identifier
---
moment.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/moment.js b/moment.js
index 79d25e44d..f7d472a23 100644
--- a/moment.js
+++ b/moment.js
@@ -1081,7 +1081,9 @@
/*global ender:false */
if (typeof ender === 'undefined') {
// here, `this` means `window` in the browser, or `global` on the server
- this.moment = moment;
+ // add `moment` as a global object via a string identifier,
+ // for Closure Compiler "advanced" mode
+ this['moment'] = moment;
}
/*global define:false */
if (typeof define === "function" && define.amd) {
--
2.47.2