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

Unified Diff: pkg/polymer/lib/src/instance.dart

Issue 26395002: fix polymer copy-instance-attributes feature (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: update pkg.status 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 | « pkg/polymer/lib/src/declaration.dart ('k') | pkg/polymer/test/instance_attrs_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/instance.dart
diff --git a/pkg/polymer/lib/src/instance.dart b/pkg/polymer/lib/src/instance.dart
index f0bff99c4637274b00dd6c5d15419547f71b76d9..67f577b6a8ae966b4489886376cfa0a9d17d421e 100644
--- a/pkg/polymer/lib/src/instance.dart
+++ b/pkg/polymer/lib/src/instance.dart
@@ -273,7 +273,7 @@ class PolymerElement extends CustomElement with ObservableMixin {
void copyInstanceAttributes() {
_declaration._instanceAttributes.forEach((name, value) {
- attributes[name] = value;
+ attributes.putIfAbsent(name, () => value);
});
}
« no previous file with comments | « pkg/polymer/lib/src/declaration.dart ('k') | pkg/polymer/test/instance_attrs_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698