fix: fix referring to refBlock in another refBlock

Change-Id: Idb7c4c63c1e75e8bbd9b283045536eba5d4397d8
This commit is contained in:
xiaodemen 2022-01-18 12:41:50 +08:00 committed by GU Yiling
parent 6237398af9
commit 67ab3454ef

View File

@ -28,8 +28,7 @@ export default function attacher () {
}
visit(tree, NAME, ({ id, value }) => {
let { contents } = render(value, path, data)
data.refs[id] = contents
data.refs[id] = () => render(value, path, data).contents
})
remove(tree, NAME)
@ -42,7 +41,7 @@ export default function attacher () {
parent.children.splice(index, 1, {
type: 'html',
value: data.refs[id]
value: data.refs[id]()
})
})
}