Fix conditions crash when custom options component is used (#14233)

Fixes #14189
This commit is contained in:
Rijk van Zanten
2022-06-30 18:56:17 -04:00
committed by GitHub
parent cef060a0fc
commit 3008d64c7c
2 changed files with 4 additions and 1 deletions

View File

@@ -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];