don't explode when we watch a null game
This commit is contained in:
parent
8bd7532160
commit
0221c7d15d
@ -33,6 +33,9 @@ const roundChips = computed(() => [
|
|||||||
// TODO(zeph): this probably should just be handled by the server and sent in the dto
|
// TODO(zeph): this probably should just be handled by the server and sent in the dto
|
||||||
const msg = ref<string>('');
|
const msg = ref<string>('');
|
||||||
watch(props.game, (now, was) => {
|
watch(props.game, (now, was) => {
|
||||||
|
if (now == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (now.live != null && was?.live == null) {
|
if (now.live != null && was?.live == null) {
|
||||||
msg.value = `THE SHOTGUN CONTAINS ${now.live} LIVE AND ${now.blank} BLANK SHELLS`;
|
msg.value = `THE SHOTGUN CONTAINS ${now.live} LIVE AND ${now.blank} BLANK SHELLS`;
|
||||||
} else if (was == null) {
|
} else if (was == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user