]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Parsing with array and strict parsing now play nicely
authorIskren Chernev <iskren.chernev@gmail.com>
Tue, 17 Sep 2013 07:51:27 +0000 (00:51 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Tue, 17 Sep 2013 07:51:27 +0000 (00:51 -0700)
moment.js

index f04afcdf3f2ea32c454d9dcd2130afa444e5c3f1..c6d7222bc261927162e85e2993960702397c9e1f 100644 (file)
--- a/moment.js
+++ b/moment.js
             currentScore = compareArrays(tempConfig._a, tempMoment.toArray());
             // if there is any input that was not parsed
             // add a penalty for that format
-            currentScore += tempMoment._il;
+            currentScore += tempMoment._il || 0;
 
             if (currentScore < scoreToBeat) {
                 scoreToBeat = currentScore;