]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix for moment not working under browserify, because "window" is defined here 25/head
authorSteve Mason <steve@spmason.com>
Tue, 18 Oct 2011 12:37:46 +0000 (14:37 +0200)
committerSteve Mason <steve@spmason.com>
Tue, 18 Oct 2011 12:37:46 +0000 (14:37 +0200)
moment.js

index 4760b59d84ac97defbca9a6c3301055af5322a68..5721768e0437f8865c8654333947f7466ed67859 100644 (file)
--- a/moment.js
+++ b/moment.js
@@ -10,7 +10,7 @@
     var moment,
         round = Math.round,
         languages = {},
-        isNode = (typeof window === 'undefined' && typeof module !== 'undefined'),
+        isNode = (typeof module !== 'undefined'),
         paramsToParse = 'months|monthsShort|weekdays|weekdaysShort|relativeTime|ordinal'.split('|'),
         i,
         shortcuts = 'Month|Date|Hours|Minutes|Seconds'.split('|');