From 3e6bf34c2d99d2da554182f8e42661cce8263fe0 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Tue, 2 Jan 2024 20:53:49 -0700 Subject: [PATCH] Added default arena_id --- src/routes/+page.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4b1b126..f3ff92a 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -139,6 +139,9 @@ import { onMount } from 'svelte'; onMount(() => { const search_params = new URLSearchParams(window.location.search); arena_id = search_params.get("arena"); + if (arena_id === null) { + arena_id = "default"; + } arena_topic = `arena/${arena_id}`; arena_state_topic = `arena/${arena_id}/state`; arena_score_topic = `arena/${arena_id}/score`;