Skip to content

Commit 1aaba19

Browse files
author
Dan Le
committed
Prevent infinite loop on invalid month (fixes uxsolutions#224)
Few ways to fix this, but the problem seems to be on line 739 where when v is NaN the loop never exits
1 parent cd46d38 commit 1aaba19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/bootstrap-datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@
774774
}
775775
for (var i=0, s; i<setters_order.length; i++){
776776
s = setters_order[i];
777-
if (s in parsed)
777+
if (s in parsed && !isNaN(parsed[s]))
778778
setters_map[s](date, parsed[s])
779779
}
780780
}

0 commit comments

Comments
 (0)