diff --git a/Frontend/src/lib/components/EvolutionTree.svelte b/Frontend/src/lib/components/EvolutionTree.svelte index 9007c9b..c1d7b2f 100644 --- a/Frontend/src/lib/components/EvolutionTree.svelte +++ b/Frontend/src/lib/components/EvolutionTree.svelte @@ -44,7 +44,13 @@ let activeBranch = $state('ponte'); let branchConfig = $derived(BRANCH_CONFIG[activeBranch]); - let branchNodes = $derived(game.state.evolutionTree.filter((n) => n.branch === activeBranch)); + let branchNodes = $derived(game.state.evolutionTree.filter((n: any) => n.branch === activeBranch)); + + // Debug — remove after fix confirmed + $effect(() => { + const tree = game.state.evolutionTree; + console.log('[EvolutionTree] tree length:', tree.length, 'activeBranch:', activeBranch, 'filtered:', tree.filter((n: any) => n.branch === activeBranch).length, 'first node:', tree[0] ? { id: tree[0].id, branch: tree[0].branch } : 'empty'); + }); let spentDna = $derived(getSpentDna(game.state.evolutionTree)); let hasUnlocked = $derived(spentDna > 0); let resetCost = $derived(getTreeResetCost(game.state));