diff --git a/src/lib/components/History/History.svelte b/src/lib/components/History/History.svelte index 444cb294..293fdbfe 100644 --- a/src/lib/components/History/History.svelte +++ b/src/lib/components/History/History.svelte @@ -105,6 +105,11 @@ // Absolute editor URL for an entry, so the link can be opened in a new tab or copied. const entryUrl = (state: State): string => `${window.location.origin}${window.location.pathname}#${serializeState(state)}`; + + // Serialize each entry's URL once per change rather than per row on every render. + const entriesWithUrl = $derived( + historyState.entries.map((entry) => ({ ...entry, openUrl: entryUrl(entry.state) })) + ); @@ -143,8 +148,8 @@ {/snippet}