From 64c8f0d55a6dd0b0409e17b243c97feb9ca845fa Mon Sep 17 00:00:00 2001 From: Piotr Karwatka Date: Wed, 1 May 2019 19:24:39 +0200 Subject: [PATCH] Fix for special_price active check This is a backport for a https://github.com/DivanteLtd/vue-storefront/issues/2838 fix from develop branch --- src/lib/taxcalc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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