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/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed6a2d4e1f3e32abce6939ef451f0cd4f8c54a1b;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,