From 8c408e4c7dbf25d15fc8006fb709ce351d733aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 11 Nov 2024 18:17:16 -0500 Subject: [PATCH] fix(components): update character selector ensure that `undefined` isn't passed to character option array --- components/story/atoms/characters.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/story/atoms/characters.vue b/components/story/atoms/characters.vue index fe961dd..fb679be 100644 --- a/components/story/atoms/characters.vue +++ b/components/story/atoms/characters.vue @@ -8,7 +8,7 @@ const opts = computed(() => { const unflattened: any[] = []; selectedBands?.value?.forEach((v: number) => { - unflattened.push(allBands?.value.find((a) => a._id == v)?.characters); + unflattened.push(allBands?.value.find((a) => a._id == v)?.characters ?? []); }); return unflattened.flat(Infinity).map((a) => ({ value: a, label: a })); });