Skip to content

Conversation

@hmdne
Copy link
Member

@hmdne hmdne commented Dec 22, 2021

The old logic was a bit silly at least.

cookies = $document.cookies
cookies['x'] = 'test'
cookies['x'] # JSON::ParserError

There was a test if a set value is a String and if it is, then it wasn't serialized with JSON. But when reading, it always used JSON.parse.

While this in theory breaks compatibility, it doesn't, because it didn't work before.

@hmdne
Copy link
Member Author

hmdne commented Dec 22, 2021

Interesting error with Opal v1.4.0. Let's ignore it for now, but we will need to iron out this issue before Opal v1.4.0 release.

@hmdne hmdne merged commit c869443 into master Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants