fix(runtime-vapor): stale memo cache

This commit is contained in:
三咲智子 Kevin Deng 2024-10-05 17:08:13 +08:00
parent 3d487184ea
commit 3867942ddb
No known key found for this signature in database
1 changed files with 6 additions and 3 deletions

View File

@ -266,15 +266,18 @@ export const createFor = (
block.nodes = scope.run(() => {
if (getMemo) {
return withMemo(
() => block.memo!,
() =>
getMemo(
block.state[0].value,
block.state[1].value,
block.state[2].value,
),
() => renderItem(state),
)
}
return renderItem(state)
})!
// TODO v-memo
// if (getMemo) block.update()
if (parent) insert(block.nodes, parent, anchor)
return block