fix(components): update character selector

ensure that `undefined` isn't passed to character option array
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2024-11-11 18:17:16 -05:00
parent 26c0352504
commit 8c408e4c7d
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -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 }));
});