From a0d5028540e1bcbb3b37bf488c11ea94f97b5fa7 Mon Sep 17 00:00:00 2001 From: metonym Date: Wed, 6 Mar 2024 19:05:22 -0800 Subject: [PATCH] fix: avoid using reserved `$` for Svelte 5 compat Co-Authored-By: Eric Fulton <5297269+Sahasrara@users.noreply.github.com> --- src/ContentSwitcher/Switch.svelte | 4 ++-- src/ProgressIndicator/ProgressIndicator.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ContentSwitcher/Switch.svelte b/src/ContentSwitcher/Switch.svelte index 40b52c71..910889a5 100644 --- a/src/ContentSwitcher/Switch.svelte +++ b/src/ContentSwitcher/Switch.svelte @@ -23,8 +23,8 @@ ctx.add({ id, text, selected }); - const unsubscribe = ctx.currentId.subscribe(($) => { - selected = $ === id; + const unsubscribe = ctx.currentId.subscribe((currentId) => { + selected = currentId === id; }); afterUpdate(() => { diff --git a/src/ProgressIndicator/ProgressIndicator.svelte b/src/ProgressIndicator/ProgressIndicator.svelte index 688a797a..26cb9db5 100644 --- a/src/ProgressIndicator/ProgressIndicator.svelte +++ b/src/ProgressIndicator/ProgressIndicator.svelte @@ -16,8 +16,8 @@ const dispatch = createEventDispatcher(); const steps = writable([]); - const stepsById = derived(steps, ($) => - $.reduce((a, c) => ({ ...a, [c.id]: c }), {}) + const stepsById = derived(steps, (steps) => + steps.reduce((a, c) => ({ ...a, [c.id]: c }), {}) ); const preventChangeOnClickStore = writable(preventChangeOnClick);