Skip to content

Commit

Permalink
Add comment. Ensure Date deserializes to String for correctness.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Feb 19, 2016
1 parent ec85582 commit 69c7087
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/micro/attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@

case 'object':
if (value instanceof Date) {
return value;
return value.toString();
} else if (value) {
try {
return JSON.stringify(value);
Expand Down
3 changes: 3 additions & 0 deletions src/standard/configure.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@
var value = (p === x.effect.value) ? config[p] :
this._get(x.effect.value, config);
if (x.effect.kind == 'attribute') {
// For attribute bindings, flow through the same ser/deser
// process to ensure the value is the same as if it were
// bound through the attribute
value = node.deserialize(node.serialize(value),
node._propertyInfo[name].type);
}
Expand Down

0 comments on commit 69c7087

Please sign in to comment.