Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: pkg/polymer/lib/deserialize.dart

Issue 41293002: Fixes from polymer.dart API review (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Made Job a part of polymer Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/polymer/lib/job.dart » ('j') | samples/third_party/todomvc/test/listorder_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/deserialize.dart
diff --git a/pkg/polymer/lib/deserialize.dart b/pkg/polymer/lib/deserialize.dart
index 0abd1b1c59bcdf3d4bc72921c8fd4cb647442f40..60e63f7588ccfa43c502f45f0464544672d18dbc 100644
--- a/pkg/polymer/lib/deserialize.dart
+++ b/pkg/polymer/lib/deserialize.dart
@@ -12,13 +12,13 @@ final _typeHandlers = () {
var m = new Map();
m[#dart.core.String] = (x, _) => x;
m[#dart.core.Null] = (x, _) => x;
- m[#dart.core.DateTime] = (x, _) {
+ m[#dart.core.DateTime] = (x, def) {
// TODO(jmesserly): shouldn't need to try-catch here
// See: https://code.google.com/p/dart/issues/detail?id=1878
try {
return DateTime.parse(x);
} catch (e) {
- return new DateTime.now();
+ return def;
}
};
m[#dart.core.bool] = (x, _) => x != 'false';
« no previous file with comments | « no previous file | pkg/polymer/lib/job.dart » ('j') | samples/third_party/todomvc/test/listorder_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698