diff --git a/moment-jdateformatparser.js b/moment-jdateformatparser.js index a6140c0..25a91c8 100644 --- a/moment-jdateformatparser.js +++ b/moment-jdateformatparser.js @@ -157,7 +157,7 @@ } } - if (typeof require !== 'undefined' && require !== null) { + if (typeof this.moment === 'undefined' && typeof require !== 'undefined' && require !== null) { if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { //Check if the environment is Node.js hookMoment(require('moment')); //if it is, we have to require it different (without the surrounding Array) } else {