mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Fix conditions crash when custom options component is used (#14233)
Fixes #14189
This commit is contained in:
@@ -77,7 +77,6 @@ export default defineComponent({
|
||||
|
||||
const usesCustomComponent = computed(() => {
|
||||
if (!selectedInterface.value) return false;
|
||||
|
||||
return selectedInterface.value.options && 'render' in selectedInterface.value.options;
|
||||
});
|
||||
|
||||
|
||||
@@ -100,6 +100,9 @@ export default defineComponent({
|
||||
const selectedInterface = getInterface(interfaceID.value);
|
||||
if (!selectedInterface || !selectedInterface.options) return [];
|
||||
|
||||
// Indicates a custom vue component is used for the interface options
|
||||
if ('render' in selectedInterface.options) return [];
|
||||
|
||||
let optionsObjectOrArray;
|
||||
|
||||
if (typeof selectedInterface.options === 'function') {
|
||||
@@ -132,6 +135,7 @@ export default defineComponent({
|
||||
} else {
|
||||
optionsObjectOrArray = selectedInterface.options;
|
||||
}
|
||||
|
||||
const optionsArray = Array.isArray(optionsObjectOrArray)
|
||||
? optionsObjectOrArray
|
||||
: [...optionsObjectOrArray.standard, ...optionsObjectOrArray.advanced];
|
||||
|
||||
Reference in New Issue
Block a user