canjs / can-route

Observable front-end application routing for CanJS.
https://canjs.com/doc/can-route.html
MIT License
10 stars 4 forks source link

Calling attr with an object on can-route.data stringifies object #197

Closed mikemitchel closed 6 years ago

mikemitchel commented 6 years ago

stringCoercingMapDecorator checks if a property is serializable before serializing here:

https://github.com/canjs/can-route/blob/cdeb144c5dededaad488d64e2f75907624dd0f07/can-route.js#L356

...but if attr is called with an object, this will always be true and everything will be serialized.

Here is an example: http://jsbin.com/cabucog/1/edit?html,js,console,output

phillipskevin commented 6 years ago

closed by #198.