Skip to content

Commit

Permalink
FIX: interface state in case of null value
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic-Marcelino committed Nov 8, 2024
1 parent 234603c commit 3f37d01
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { useStores } from '@directus/extensions-sdk';
const props = defineProps({
value: {
type: Array as PropType<String[]>,
default: [],
type: Array as PropType<String[]> | null,
},
});
Expand All @@ -33,6 +32,10 @@ const allTransformations = computed(() => {
});
const displayAutoFormatNotice = computed(() => {
if (!props.value) {
return false;
}
return props.value.find((transformationKey) => {
// check if transformation is a system transformation or if it's a custom transformation with format 'auto'
const isSystemTransformation = systemTransformations.some((transformation) => transformation.value === transformationKey);
Expand Down Expand Up @@ -61,7 +64,7 @@ const displayAutoFormatNotice = computed(() => {
icon-off="check_box_outline_blank"
:value="item.value"
:label="item.text"
:model-value="value"
:model-value="value || []"
@update:model-value="$emit('input', $event)"
/>
</div>
Expand Down

0 comments on commit 3f37d01

Please sign in to comment.