diff --git a/src/routes/characters/[id].svelte b/src/routes/characters/[id].svelte index e1c1f5d0..2b7939fa 100644 --- a/src/routes/characters/[id].svelte +++ b/src/routes/characters/[id].svelte @@ -96,7 +96,7 @@ let chars = {}; let constellationCount = -1; let manualCount = 0; - let editConstallation = false; + let editConstellation = false; const showedIndex = [1, 20, 21, 41, 42, 52, 53, 63, 64, 74, 75, 85, 86, 96]; const level = [1, 20, 20, 40, 40, 50, 50, 60, 60, 70, 70, 80, 80, 90]; @@ -118,11 +118,11 @@ } function editConstellationCount(val) { - manualCount = Math.max(0, manualCount + val); + manualCount = Math.max(manualCount + val); } async function saveConstellationCount() { - editConstallation = false; + editConstellation = false; if (chars[id]) { chars[id].manual = manualCount; } else if (defaultChars[id]) { @@ -166,7 +166,7 @@ await getConstellationCount(); }); - $: constellationCountTotal = constellationCount + manualCount; + $: constellationCountTotal = Math.max(0, constellationCount + manualCount); $: buildName = builds[currentBuild].name; $: build = builds[currentBuild].build; @@ -198,7 +198,7 @@ alt={character.element.name} />
@@ -207,7 +207,7 @@ C{constellationCountTotal}

{/if} - {#if editConstallation} + {#if editConstellation}