Closed zWingz closed 3 years ago
when setLocalStorage, the expires will be set to Date.now + 30days, but when getLocalStorage, it test Date.now + 30days > lastDate.now + 30days, it equal to cacl Date.now > lastDate.now, it always true, so it always expired
setLocalStorage
Date.now
30days
getLocalStorage
Date.now + 30days
lastDate.now + 30days
lastDate.now
Thanks, this is fixed now.
key error
when
setLocalStorage
, the expires will be set toDate.now
+30days
, but whengetLocalStorage
, it testDate.now + 30days
>lastDate.now + 30days
, it equal to caclDate.now
>lastDate.now
, it always true, so it always expired