avoid multimodel update loop

This commit is contained in:
terraputix
2026-08-03 21:57:36 +02:00
parent 8b58bc01d7
commit b50eee634e
2 changed files with 4 additions and 45 deletions
@@ -1,5 +1,5 @@
<script lang="ts">
import { onDestroy, onMount } from 'svelte';
import { onDestroy, onMount, untrack } from 'svelte';
import { get } from 'svelte/store';
import { fade } from 'svelte/transition';
@@ -239,8 +239,9 @@
return;
}
loading = fetchedData === null;
refreshing = fetchedData !== null;
const hasFetchedData = untrack(() => fetchedData !== null);
loading = !hasFetchedData;
refreshing = hasFetchedData;
loadError = null;
const timer = window.setTimeout(() => {
const controller = new AbortController();