diff --git a/src/routes/characters/[id].svelte b/src/routes/characters/[id].svelte index 30226ec7..0f784724 100644 --- a/src/routes/characters/[id].svelte +++ b/src/routes/characters/[id].svelte @@ -233,9 +233,12 @@ onMount(async () => { const buildHash = window.location.hash.substring(1); - const foundBuild = builds.findIndex((e) => e.name.replace(/[ /]/g, '_').toLowerCase() === buildHash); - if (foundBuild > -1) { - currentBuild = foundBuild; + + if (builds) { + const foundBuild = builds.findIndex((e) => e.name.replace(/[ /]/g, '_').toLowerCase() === buildHash); + if (foundBuild > -1) { + currentBuild = foundBuild; + } } await getConstellationCount();