fix(components): update character selector
ensure that `undefined` isn't passed to character option array
This commit is contained in:
parent
26c0352504
commit
8c408e4c7d
@ -8,7 +8,7 @@
|
|||||||
const opts = computed(() => {
|
const opts = computed(() => {
|
||||||
const unflattened: any[] = [];
|
const unflattened: any[] = [];
|
||||||
selectedBands?.value?.forEach((v: number) => {
|
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 }));
|
return unflattened.flat(Infinity).map((a) => ({ value: a, label: a }));
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user