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

Unified Diff: sky/framework/sky-element.sky

Issue 932103004: Make the stock app demo list view prettier (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/examples/stocks/stock-arrow.sky ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/sky-element.sky
diff --git a/sky/framework/sky-element.sky b/sky/framework/sky-element.sky
index e1d0a0ea715da04f9ea53e51ecceeb5be2b74d6f..5a4082316a3f08f5a716a48804a695a8c57c08f9 100644
--- a/sky/framework/sky-element.sky
+++ b/sky/framework/sky-element.sky
@@ -14,7 +14,11 @@ final Map<String, _Converter> _kAttributeConverters = {
return value == 'true';
},
'number': (String value) {
- return double.parse(value);
+ try {
+ return double.parse(value);
+ } catch(_) {
+ return 0.0;
+ }
},
'string': (String value) {
return value == null ? '' : value;
« no previous file with comments | « sky/examples/stocks/stock-arrow.sky ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698