Skip to content

Commit bb96427

Browse files
committed
revert: refactor(client): handle page data hmr by checking pageChunk ref
It would cause error in webpack hmr
1 parent c645d1a commit bb96427

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/client/src/setupGlobalComputed.ts

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

0 commit comments

Comments
 (0)