]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix ISO matching for IE8
authorIskren Chernev <iskren.chernev@gmail.com>
Thu, 31 Dec 2015 09:57:52 +0000 (11:57 +0200)
committerIskren Chernev <iskren.chernev@gmail.com>
Thu, 31 Dec 2015 09:57:52 +0000 (11:57 +0200)
src/lib/create/from-string.js

index 6476457e8518fd9a9082b2734f6f1a8199403fda..6852049f2a5734c1e95cdf569d63023fd8f9ad0a 100644 (file)
@@ -61,7 +61,7 @@ export function configFromISO(config) {
             config._isValid = false;
             return;
         }
-        if (match[3] != null) {
+        if (match[3]) {
             for (i = 0, l = isoTimes.length; i < l; i++) {
                 if (isoTimes[i][1].exec(match[3])) {
                     // match[2] should be 'T' or space
@@ -78,7 +78,7 @@ export function configFromISO(config) {
             config._isValid = false;
             return;
         }
-        if (match[4] != null) {
+        if (match[4]) {
             if (tzRegex.exec(match[4])) {
                 tzFormat = 'Z';
             } else {