as-ideas / oil

191 stars 56 forks source link

Bug "i.expires.toUTCString is not a function" #278

Closed loano closed 3 years ago

loano commented 5 years ago

When setting a Cookie expiry date, the banner no longer disappears on clicking OK. Chrome Console states the following:

https://sandbox.oiljs.org/oil/oil.min.js Uncaught (in promise) TypeError: i.expires.toUTCString is not a function at Function.o [as set] (oil.min.js:16) at h (oil.min.js:1) at oil.min.js:1

Steps To Reproduce:

Use Chrome Version 77.0.3865.90 (Offizieller Build) (64-Bit) Go to https://sandbox.oiljs.org/ Go to "Oil Configuration" Enter cookie_expires_in_days = 3650 Press "Preview" button Press banner "OK"

Result: Banner stays

Expected result: The banner should close

rbuer commented 5 years ago

Thanks for your bugreport. The value of cookie_expires_in_days is quoted so it is interpreted as a string, which is wrong, when creating your Config with the Sandbox, please remove the quotes around values that are obviosly numbers