diff options
author | Roan Kattouw <roan.kattouw@gmail.com> | 2016-09-12 11:50:34 -0700 |
---|---|---|
committer | Roan Kattouw <roan.kattouw@gmail.com> | 2016-09-12 11:50:34 -0700 |
commit | 939c85ac7fe2c187a480f7c9fc06b46b3a3e05a0 (patch) | |
tree | ab0d98efd8ae7707e96720e263a04b7a4c3ac951 /resources/lib/moment/locale/my.js | |
parent | 4cbefc10484991b0cb685419185b8b4cb586d7ea (diff) | |
download | mediawikicore-939c85ac7fe2c187a480f7c9fc06b46b3a3e05a0.tar.gz mediawikicore-939c85ac7fe2c187a480f7c9fc06b46b3a3e05a0.zip |
momentjs: Hack around bug in node/browser compat wrapper in locale files
If there is an element with id="global" on the page,
typeof global !== 'undefined' is true, but global.moment will
still be undefined and shouldn't be used.
For now, comment out the wrapper and just use 'this'.
We should look into upgrading to momentjs 2.14 where this bug is fixed.
Bug: T145382
Change-Id: Ia6e3b46e42248a5ee3c61c5fcda7d020d012e89e
Diffstat (limited to 'resources/lib/moment/locale/my.js')
-rw-r--r-- | resources/lib/moment/locale/my.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/resources/lib/moment/locale/my.js b/resources/lib/moment/locale/my.js index 31f5c9ea8bd4..daba17d554a7 100644 --- a/resources/lib/moment/locale/my.js +++ b/resources/lib/moment/locale/my.js @@ -3,13 +3,15 @@ // author : Squar team, mysquar.com (function (factory) { - if (typeof define === 'function' && define.amd) { + // Comment out broken wrapper, see T145382 + /*if (typeof define === 'function' && define.amd) { define(['moment'], factory); // AMD } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { factory((typeof global !== 'undefined' ? global : this).moment); // node or other global - } + }*/ + factory(this.moment); }(function (moment) { var symbolMap = { '1': '၁', |