Skip to content

Commit

Permalink
for Closure Compiler "advanced" mode, add moment as a global object…
Browse files Browse the repository at this point in the history
… via a string identifier
  • Loading branch information
p-baleine committed Jun 25, 2012
1 parent 975ec27 commit fe563d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion moment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fe563d8

Please sign in to comment.