Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the cookie module #95

Merged
merged 2 commits into from
Dec 22, 2021
Merged

Refactor the cookie module #95

merged 2 commits into from
Dec 22, 2021

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.

1 participant