diff --git a/src/lib/taxcalc.js b/src/lib/taxcalc.js index 77dcce7f..1bbd19c0 100644 --- a/src/lib/taxcalc.js +++ b/src/lib/taxcalc.js @@ -1,7 +1,7 @@ function isSpecialPriceActive(fromDate, toDate) { const now = new Date() - fromDate = new Date(fromDate) || false - toDate = new Date(toDate) || false + fromDate = fromDate ? new Date(fromDate) : false + toDate = toDate ? new Date(toDate) : false if (!fromDate && !toDate) { return true