From 898fe890779d033a843f5659a8155053d4713853 Mon Sep 17 00:00:00 2001 From: Filipe Araujo Date: Tue, 16 Jun 2015 14:05:41 -0400 Subject: [PATCH] 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 ce7cbfeafd..adcb8c8f46 100644 --- a/src/lib/template/templatizer.html +++ b/src/lib/template/templatizer.html @@ -277,7 +277,9 @@ 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 @@ }; - \ No newline at end of file + diff --git a/test/unit/template/dom-template.html b/test/unit/template/dom-template.html index f36ddad403..d045800b7f 100644 --- a/test/unit/template/dom-template.html +++ b/test/unit/template/dom-template.html @@ -21,6 +21,34 @@ {{text}} + + + + + + +