mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
subViews is in TemplateView
This commit is contained in:
parent
c4b17e4be6
commit
0623c1c665
@ -281,9 +281,10 @@ class TemplateBuilder {
|
|||||||
const boolFn = value => !!fn(value);
|
const boolFn = value => !!fn(value);
|
||||||
return this._addReplaceNodeBinding(boolFn, (prevNode) => {
|
return this._addReplaceNodeBinding(boolFn, (prevNode) => {
|
||||||
if (prevNode && prevNode.nodeType !== Node.COMMENT_NODE) {
|
if (prevNode && prevNode.nodeType !== Node.COMMENT_NODE) {
|
||||||
const viewIdx = this._subViews.findIndex(v => v.root() === prevNode);
|
const subViews = this._templateView._subViews;
|
||||||
|
const viewIdx = subViews.findIndex(v => v.root() === prevNode);
|
||||||
if (viewIdx !== -1) {
|
if (viewIdx !== -1) {
|
||||||
const [view] = this._subViews.splice(viewIdx, 1);
|
const [view] = subViews.splice(viewIdx, 1);
|
||||||
view.unmount();
|
view.unmount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user