Skip to content

Commit 3daf0fc

Browse files
committed
refactor(client): handle page data hmr by checking pageChunk ref
1 parent 44fcf61 commit 3daf0fc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/client/src/setupGlobalComputed.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ export const setupGlobalComputed = (
5050
const newPageChunk = { comp: oldPageChunk.comp, data: newPageData }
5151
routes.value[newPageData.path].loader = () =>
5252
Promise.resolve(newPageChunk)
53-
if (
54-
newPageData.path ===
55-
router.currentRoute.value.meta._pageChunk?.data.path
56-
) {
53+
if (newPageData.path === pageChunk.value.data.path) {
5754
pageChunk.value = newPageChunk
5855
}
5956
}

0 commit comments

Comments
 (0)