Skip to content

Commit f0488a4

Browse files
author
Joscha Rohmann
committed
Now cloning __props__ and changed order in 'with'
Cloning the __props__ property of contexts to prevent it from being overwritten e.g. with new Views and changed the order of execution in the 'with'-data-querie to first push the context and then modify it.
1 parent b72e8cc commit f0488a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/query/DomQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ define([
6868
$parents: context ? models : [],
6969
$index: this._dataIndex || null,
7070
$parentContext: context || null,
71-
__props__: context && context.__props__
71+
__props__: blocks.clone(context && context.__props__)
7272
};
7373
newContext.$context = newContext;
7474
this._context = newContext;

src/query/queries.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,11 @@ define([
220220
if (this._renderMode != VirtualElement.RenderMode.None) {
221221
var renderEndTag = this.renderEndTag;
222222

223+
domQuery.pushContext(value);
224+
223225
if (name) {
224226
domQuery.addProperty(name, value);
225227
}
226-
domQuery.pushContext(value);
227228

228229
this.renderEndTag = function () {
229230
domQuery.popContext();

0 commit comments

Comments
 (0)