Skip to content

Commit 8963c55

Browse files
committedSep 28, 2022
fix(ssr): fix dynamic slot regression in ssr
fix #6651
1 parent 9698dd3 commit 8963c55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/runtime-core/src/helpers/createSlots.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export function createSlots(
3333
const res = slot.fn(...args)
3434
// attach branch key so each conditional branch is considered a
3535
// different fragment
36-
;(res as any).key = slot.key
36+
// #6651 res can be undefined in SSR in string push mode
37+
if (res) (res as any).key = slot.key
3738
return res
3839
}
3940
: slot.fn

0 commit comments

Comments
 (0)
Please sign in to comment.