]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
for Closure Compiler "advanced" mode, add `moment` as a global object via a string... 342/head
authorTajima Junpei <p.baleine@gmail.com>
Mon, 25 Jun 2012 02:32:56 +0000 (11:32 +0900)
committerTajima Junpei <p.baleine@gmail.com>
Mon, 25 Jun 2012 02:32:56 +0000 (11:32 +0900)
moment.js

index 79d25e44d144f448b878030ceb56936c7e5081bb..f7d472a23d49ad58a2a0368695e070270d7fce73 100644 (file)
--- a/moment.js
+++ b/moment.js
     /*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) {