]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-vapor): stale memo cache
author三咲智子 Kevin Deng <sxzz@sxzz.moe>
Sat, 5 Oct 2024 09:08:13 +0000 (17:08 +0800)
committer三咲智子 Kevin Deng <sxzz@sxzz.moe>
Sat, 5 Oct 2024 12:33:35 +0000 (20:33 +0800)
packages/runtime-vapor/src/apiCreateFor.ts

index 8a566237e5de21e57278fd2005c66e5d2b207478..29913ac0497c61fbab5fba2c7fa9b454a0f7a92b 100644 (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