Skip to content

Commit

Permalink
fix(runtime-vapor): stale memo cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Oct 5, 2024
1 parent 3d48718 commit 3867942
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/runtime-vapor/src/apiCreateFor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3867942

Please sign in to comment.