From 070db1235a36509b04bfda91be08659c02475d92 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sat, 27 Jun 2020 02:10:47 +0300 Subject: [PATCH] Fix parsing values that can be both strings and arrays --- src/views/settings/components/Http.vue | 4 ---- src/views/settings/components/Inputs.vue | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/settings/components/Http.vue b/src/views/settings/components/Http.vue index f279a0d2..d6954336 100644 --- a/src/views/settings/components/Http.vue +++ b/src/views/settings/components/Http.vue @@ -10,10 +10,6 @@ - - - - diff --git a/src/views/settings/components/Inputs.vue b/src/views/settings/components/Inputs.vue index 4b630ffe..0b14e282 100644 --- a/src/views/settings/components/Inputs.vue +++ b/src/views/settings/components/Inputs.vue @@ -228,6 +228,9 @@ export default { return this.data.value ? this.data.value[this.setting.key] : [] } else if (this.setting.type === 'atom') { return this.data[this.setting.key] && this.data[this.setting.key][0] === ':' ? this.data[this.setting.key].substr(1) : this.data[this.setting.key] + } else if (Array.isArray(this.setting.type) && + this.setting.type.find(el => Array.isArray(el) && el.includes('list'))) { + return typeof this.data[this.setting.key] === 'string' ? [this.data[this.setting.key]] : this.data[this.setting.key] } else { return this.data[this.setting.key] }