fix(electrobun): loadLastSession in onMount not $effect (prevents infinite reactive cycle)

This commit is contained in:
Hibryda 2026-03-23 21:19:30 +01:00
parent a4c0435b56
commit 805d1e533d

View file

@ -122,10 +122,9 @@
// Derived from project-tabs-store for reactive reads
let activeTab = $derived(getActiveTab(id));
// ── Load last session on mount ──────────────────────────────────────
$effect(() => {
loadLastSession(id);
});
// ── Load last session on mount (once, not reactive) ─────────────────
import { onMount } from 'svelte';
onMount(() => { loadLastSession(id); });
function setTab(tab: ProjectTab) {
setActiveTab(id, tab);