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