jaywcjlove / cookie.js

:cookie: A simple, lightweight JavaScript API for handling browser cookies , it is easy to pick up and use, has a reasonable footprint(~2kb, gzipped: 0.95kb), and has no dependencies. It should not interfere with any JavaScript libraries or frameworks. https://jaywcjlove.github.io/cookie.js/
https://jaywcjlove.github.io/cookie.js
185 stars 55 forks source link

Spurious "[expires] is read-only" exception #22

Open DanielGardiner opened 2 years ago

DanielGardiner commented 2 years ago

Using cookiejs v2.1.0 I get the following spurious exception: Uncaught TypeError: "expires" is read-only

This occurs when attempting to set a cookie e.g. cookie.set('test', 'true', { expires: 1, })

Or attempting to remove a cookie e.g. cookie.remove('test')

This issue resolves if switching back to cookiejs v2.0.0

jaywcjlove commented 2 years ago
image

I don't have this problem.

@DanielGardiner