Skip to content

Commit

Permalink
fix(ssr): fix dynamic slot regression in ssr
Browse files Browse the repository at this point in the history
fix #6651
  • Loading branch information
yyx990803 committed Sep 28, 2022
1 parent 9698dd3 commit 8963c55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/runtime-core/src/helpers/createSlots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export function createSlots(
const res = slot.fn(...args)
// attach branch key so each conditional branch is considered a
// different fragment
;(res as any).key = slot.key
// #6651 res can be undefined in SSR in string push mode
if (res) (res as any).key = slot.key
return res
}
: slot.fn
Expand Down

0 comments on commit 8963c55

Please sign in to comment.