From 0221c7d15df1f0e4bf8e519b10809e8151ddb09d Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Fri, 2 Feb 2024 19:34:38 -0600 Subject: [PATCH] don't explode when we watch a null game --- site/src/components/GameStatus.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/src/components/GameStatus.vue b/site/src/components/GameStatus.vue index 918fe55..9b5ee9a 100644 --- a/site/src/components/GameStatus.vue +++ b/site/src/components/GameStatus.vue @@ -33,6 +33,9 @@ const roundChips = computed(() => [ // TODO(zeph): this probably should just be handled by the server and sent in the dto const msg = ref(''); watch(props.game, (now, was) => { + if (now == null) { + return; + } if (now.live != null && was?.live == null) { msg.value = `THE SHOTGUN CONTAINS ${now.live} LIVE AND ${now.blank} BLANK SHELLS`; } else if (was == null) {