Skip to content

Commit 3867942

Browse files
committed
fix(runtime-vapor): stale memo cache
1 parent 3d48718 commit 3867942

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/runtime-vapor/src/apiCreateFor.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,18 @@ export const createFor = (
266266
block.nodes = scope.run(() => {
267267
if (getMemo) {
268268
return withMemo(
269-
() => block.memo!,
269+
() =>
270+
getMemo(
271+
block.state[0].value,
272+
block.state[1].value,
273+
block.state[2].value,
274+
),
270275
() => renderItem(state),
271276
)
272277
}
273278
return renderItem(state)
274279
})!
275280

276-
// TODO v-memo
277-
// if (getMemo) block.update()
278281
if (parent) insert(block.nodes, parent, anchor)
279282

280283
return block

0 commit comments

Comments
 (0)