Closed hmdne closed 2 years ago
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.
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.
The old logic was a bit silly at least.
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.