fix: use untrack() in \$state initialisers to silence state_referenced_locally warnings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { untrack } from "svelte";
|
||||
import { goto, invalidateAll } from "$app/navigation";
|
||||
import { page } from "$app/state";
|
||||
import { SvelteURLSearchParams } from "svelte/reactivity";
|
||||
@@ -17,7 +18,7 @@
|
||||
let deleteTarget: Video | null = $state(null);
|
||||
let deleteOpen = $state(false);
|
||||
let deleting = $state(false);
|
||||
let searchValue = $state(data.search ?? "");
|
||||
let searchValue = $state(untrack(() => data.search ?? ""));
|
||||
$effect(() => { searchValue = data.search ?? ""; });
|
||||
let searchTimeout: ReturnType<typeof setTimeout>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user