From 8039c35c42e4a0727266ed5c3661140d60616e98 Mon Sep 17 00:00:00 2001 From: Andrey Elpaev Date: Fri, 12 Mar 2021 03:28:27 +0500 Subject: [PATCH 1/2] fix: checkFalsePositiveDate(dateString = '') breaks IE (#404) --- src/rules.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rules.js b/src/rules.js index a865d50..8dd020e 100755 --- a/src/rules.js +++ b/src/rules.js @@ -4,8 +4,8 @@ function leapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } -function checkFalsePositiveDates(dateString = '') { - +function checkFalsePositiveDates(dateString) { + let dateString = dateString || ''; if (dateString.length === 10) { // massage input to use yyyy-mm-dd format From 11727b9832490378200446dc93ada0e38e11587a Mon Sep 17 00:00:00 2001 From: Andrey Elpaev Date: Fri, 12 Mar 2021 11:46:30 +0500 Subject: [PATCH 2/2] fix: checkFalsePositiveDate(dateString = '') breaks IE (#404) --- src/rules.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rules.js b/src/rules.js index 8dd020e..7fec6b6 100755 --- a/src/rules.js +++ b/src/rules.js @@ -5,7 +5,8 @@ function leapYear(year) { } function checkFalsePositiveDates(dateString) { - let dateString = dateString || ''; + + dateString = dateString || ''; if (dateString.length === 10) { // massage input to use yyyy-mm-dd format