mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Handle no choices in labels display
This commit is contained in:
@@ -50,7 +50,7 @@ export default defineComponent({
|
||||
},
|
||||
showAsDot: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
choices: {
|
||||
type: Array as PropType<Choice[]>,
|
||||
@@ -78,7 +78,7 @@ export default defineComponent({
|
||||
else items = props.value as string[];
|
||||
|
||||
return items.map((item) => {
|
||||
const choice = props.choices.find((choice) => choice.value === item);
|
||||
const choice = (props.choices || []).find((choice) => choice.value === item);
|
||||
|
||||
if (choice === undefined) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user