]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Revert "Add specific check for "require" in hasModule check (fixes bug when using... 1588/head
authorIskren Chernev <iskren.chernev@gmail.com>
Thu, 3 Apr 2014 21:18:56 +0000 (14:18 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Thu, 3 Apr 2014 21:18:56 +0000 (14:18 -0700)
This reverts commit ed6a2d4e1f3e32abce6939ef451f0cd4f8c54a1b.
This was discussed in https://github.com/moment/moment/issues/1537#issuecomment-39505749

moment.js

index b79da7f26046089dd79458076a9629a7b34d2560..6a8327f9ababe19507d0b93273d4aef862ae99d4 100644 (file)
--- a/moment.js
+++ b/moment.js
@@ -41,7 +41,7 @@
         },
 
         // check for nodeJS
-        hasModule = (typeof module !== 'undefined' && module.exports && typeof require !== 'undefined'),
+        hasModule = (typeof module !== 'undefined' && module.exports),
 
         // ASP.NET json date format regex
         aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,