From 6ef07e0e42c6bc1310e14a928aa6ba1d4fcff04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Tue, 4 Apr 2023 14:04:58 +0200 Subject: [PATCH] Fallback defaultFieldOptionsState options to array --- .../src/components/ModuleFields/Configurator/Select.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client/web/compose/src/components/ModuleFields/Configurator/Select.vue b/client/web/compose/src/components/ModuleFields/Configurator/Select.vue index e656df008..7f9fbfc53 100644 --- a/client/web/compose/src/components/ModuleFields/Configurator/Select.vue +++ b/client/web/compose/src/components/ModuleFields/Configurator/Select.vue @@ -142,13 +142,10 @@ export default { }, defaultFieldOptionsState () { - const field = this.moduleDefaultState.fields.find(({ name }) => name === this.f.name) + const field = this.moduleDefaultState.fields.find(({ name }) => name === this.f.name) || {} + const { options = [] } = field.options - if (field) { - return field.options.options.map(({ value }) => value) - } - - return [] + return options.map(({ value }) => value) }, },