Skip to content

Commit

Permalink
fix(server-renderer): guard reassignment of prefetches behind hasAsyn…
Browse files Browse the repository at this point in the history
…cSetup conditional
  • Loading branch information
deleteme committed Aug 20, 2024
1 parent e159b16 commit 7bf6732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server-renderer/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function renderComponentVNode(
const p: Promise<unknown> = Promise.resolve(res as Promise<void>)
.then(() => {
// instance.sp may be null until an async setup resolves, so evaluate it here
prefetches = instance.sp
if (hasAsyncSetup) prefetches = instance.sp
if (prefetches) {
return Promise.all(
prefetches.map(prefetch => prefetch.call(instance.proxy)),
Expand Down

0 comments on commit 7bf6732

Please sign in to comment.