Skip to content

Commit

Permalink
chore: remove options.uid in render() (#15302)
Browse files Browse the repository at this point in the history
* remove options.uid in render()

* changeset

* chore: update changeset

---------

Co-authored-by: Paolo Ricciuti <[email protected]>
  • Loading branch information
adiguba and paoloricciuti authored Feb 15, 2025
1 parent 32b78c9 commit c40392c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-kiwis-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

chore: remove unused `options.uid` in `render`
4 changes: 2 additions & 2 deletions packages/svelte/src/internal/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ function props_id_generator() {
* Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app.
* @template {Record<string, any>} Props
* @param {import('svelte').Component<Props> | ComponentType<SvelteComponent<Props>>} component
* @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>, uid?: () => string }} [options]
* @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any> }} [options]
* @returns {RenderOutput}
*/
export function render(component, options = {}) {
const uid = options.uid ?? props_id_generator();
const uid = props_id_generator();
/** @type {Payload} */
const payload = {
out: '',
Expand Down

0 comments on commit c40392c

Please sign in to comment.