Skip to content

Commit

Permalink
fix: make props optional during SSR (#12284)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Jul 3, 2024
1 parent 7e64e84 commit 2f1d2d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/itchy-pianos-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

fix: make props optional during SSR
2 changes: 1 addition & 1 deletion packages/svelte/src/internal/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function render(component, options = {}) {
}

// @ts-expect-error
component(payload, options.props, {}, {});
component(payload, options.props ?? {}, {}, {});

if (options.context) {
pop();
Expand Down

0 comments on commit 2f1d2d5

Please sign in to comment.