From: Jonny Gerig Meyer Date: Wed, 30 Oct 2013 00:01:24 +0000 (-0600) Subject: Add specific check for "require" in hasModule check (fixes bug when using with QUnit). X-Git-Tag: 2.5.0^2~42^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F1238%2Fhead;p=thirdparty%2Fmoment.git Add specific check for "require" in hasModule check (fixes bug when using with QUnit). --- diff --git a/moment.js b/moment.js index 9e7126e09..4858e241b 100644 --- a/moment.js +++ b/moment.js @@ -27,7 +27,7 @@ languages = {}, // check for nodeJS - hasModule = (typeof module !== 'undefined' && module.exports), + hasModule = (typeof module !== 'undefined' && module.exports && typeof require !== 'undefined'), // ASP.NET json date format regex aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,