From 898fe890779d033a843f5659a8155053d4713853 Mon Sep 17 00:00:00 2001 From: Filipe Araujo Date: Tue, 16 Jun 2015 14:05:41 -0400 Subject: [PATCH 1/2] parentProps should not override argument based props --- src/lib/template/templatizer.html | 6 +++-- test/unit/template/dom-template.html | 33 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/lib/template/templatizer.html b/src/lib/template/templatizer.html index ce7cbfea..adcb8c8f 100644 --- a/src/lib/template/templatizer.html +++ b/src/lib/template/templatizer.html @@ -277,7 +277,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN model = model || {}; if (this._parentProps) { for (var prop in this._parentProps) { - model[prop] = this['_parent_' + prop]; + if (!model[prop]) { + model[prop] = this['_parent_' + prop]; + } } } return new this.ctor(model, this); @@ -304,4 +306,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }; - \ No newline at end of file + diff --git a/test/unit/template/dom-template.html b/test/unit/template/dom-template.html index f36ddad4..d045800b 100644 --- a/test/unit/template/dom-template.html +++ b/test/unit/template/dom-template.html @@ -21,6 +21,34 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN {{text}} + + + + + + + From aeb44de787d42e293bd3ddcbb5ee62ab79619d20 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Thu, 4 Feb 2016 09:55:18 -0800 Subject: [PATCH 2/2] Move test and add to runner. --- test/runner.html | 1 + test/unit/{template => }/dom-template.html | 32 ++++++++++++---------- 2 files changed, 19 insertions(+), 14 deletions(-) rename test/unit/{template => }/dom-template.html (72%) diff --git a/test/runner.html b/test/runner.html index 8acdc9b9..22b6bb82 100644 --- a/test/runner.html +++ b/test/runner.html @@ -66,6 +66,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN 'unit/templatizer.html', 'unit/dom-repeat.html', 'unit/dom-if.html', + 'unit/dom-template.html', 'unit/dom-bind.html', 'unit/script-after-import-in-head.html', 'unit/globals.html' diff --git a/test/unit/template/dom-template.html b/test/unit/dom-template.html similarity index 72% rename from test/unit/template/dom-template.html rename to test/unit/dom-template.html index d045800b..36556a2f 100644 --- a/test/unit/template/dom-template.html +++ b/test/unit/dom-template.html @@ -11,9 +11,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - + + + @@ -28,21 +28,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN