]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
regarding global, remove unnecessary assignment
authorTajima Junpei <p.baleine@gmail.com>
Fri, 22 Jun 2012 00:09:19 +0000 (09:09 +0900)
committerTajima Junpei <p.baleine@gmail.com>
Fri, 22 Jun 2012 00:09:19 +0000 (09:09 +0900)
moment.js

index b4967095fdc08c3ac40c1906d465b792f5c9be1a..79d25e44d144f448b878030ceb56936c7e5081bb 100644 (file)
--- a/moment.js
+++ b/moment.js
@@ -17,9 +17,6 @@
         languages = {},
         currentLanguage = 'en',
 
-        // Establish the root object, `window` in the browser, or `global` on the server.
-        root = this,
-
         // check for nodeJS
         hasModule = (typeof module !== 'undefined' && module.exports),
 
     }
     /*global ender:false */
     if (typeof ender === 'undefined') {
-        root['moment'] = moment;
+        // here, `this` means `window` in the browser, or `global` on the server
+        this.moment = moment;
     }
     /*global define:false */
     if (typeof define === "function" && define.amd) {