You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of doing this, I think we should take the serialized data, param it, deparam it. If it doesn't match the original serialized data ... we should warn the user what is going on .
This means people won't be able to set numbers and such (without a type converter), but it will eliminate the zaniness that is going on in 3.0 and would carry onto 4.0.
varstringCoercingMapDecorator=function(map){varsym=canSymbol.for("can.route.stringCoercingMapDecorator");if(!map.attr[sym]){varattrSuper=map.attr;map.attr=function(prop,val){varserializable=this.define===undefined||this.define[prop]===undefined||!!this.define[prop].serialize,args;if(serializable){// if setting non-str non-num attrargs=stringify(Array.apply(null,arguments));}else{args=arguments;}returnattrSuper.apply(this,args);};canReflect.setKeyValue(map.attr,sym,true);}returnmap;};
The text was updated successfully, but these errors were encountered:
To be clear ... every time we are going to update the url from route.data changes, I propose that in development mode we do something like:
var serialized = route.data.serialize();
var serializedFromRoute = route.deparam( route.param( serialized) );
if( ! deepEqual(serialized, serializedFromRoute) ) {
// give a warning about what is different
}
Fixing this:
is just plain weird.
Instead of doing this, I think we should take the serialized data, param it, deparam it. If it doesn't match the original serialized data ... we should warn the user what is going on .
This means people won't be able to set numbers and such (without a type converter), but it will eliminate the zaniness that is going on in 3.0 and would carry onto 4.0.
The text was updated successfully, but these errors were encountered: