Skip to content

Commit 760cc81

Browse files
committed
fix: disable overlay SSR handling for svelte versions with incompatible internal api
Effectively disables Overlay SSR for svelte versions >= 5.39.0
1 parent 3d96ecc commit 760cc81

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/svelte-fluent/src/internal/OverlaySSR.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const concatOutputs = (a: PayloadOutput, b: PayloadOutput): PayloadOutput => {
3333
};
3434

3535
function OverlaySSR($$payload: Payload, $$props: Props) {
36+
if (!('out' in $$payload) || !('head' in $$payload)) {
37+
// currently we have no way to SSR render Overlays with the new svelte async renderer architecture
38+
return Overlay($$payload as unknown as Parameters<typeof Overlay>[0], $$props);
39+
}
3640
const savedOut = $$payload.out;
3741
const savedHeadOut = $$payload.head.out;
3842
$$payload.out = createEmptyOutput($$payload.out);

0 commit comments

Comments
 (0)