MadMG / moment-jdateformatparser

Translates the `java.text.SimpleDateFormat` date format to the `moment.js` date format.
MIT License
58 stars 29 forks source link

Uncaught ReferenceError: module is not defined #23

Closed dpeger closed 6 years ago

dpeger commented 6 years ago

Using the version 1.1.0 of jdateformatparser with requirejs (using requirejs 2.3.2 on my side) results in an Uncaught ReferenceError on execution of the module in line 181:

Uncaught ReferenceError: module is not defined
    at moment-jdateformatparser.js:181
    at moment-jdateformatparser.js:250

This is broken since the check for module was changed with this commit from

if (typeof module !== 'undefined' && typeof module.exports !== 'undefined')

to

if (module && module.exports)
herom commented 6 years ago

Should be fixed by #27, #29 in version 1.2.1.