From f3ff8c44450b0861fbc306feea63a33393b71ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 18 Jan 2024 14:07:29 +0100 Subject: [PATCH] fix: Avoid failing on empty strings for URL values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .../ncTable/partials/rowTypePartials/TextLinkForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/ncTable/partials/rowTypePartials/TextLinkForm.vue b/src/shared/components/ncTable/partials/rowTypePartials/TextLinkForm.vue index 131201a49..d7701535b 100644 --- a/src/shared/components/ncTable/partials/rowTypePartials/TextLinkForm.vue +++ b/src/shared/components/ncTable/partials/rowTypePartials/TextLinkForm.vue @@ -71,7 +71,7 @@ export default { localValue: { get() { // if we got an old value (string not object as json) - if (!this.hasJsonStructure(this.value) && this.value !== '' && this.value !== null && this.value !== '""') { + if (this.value && !this.hasJsonStructure(this.value)) { return { title: this.value, subline: t('tables', 'URL'), @@ -80,7 +80,7 @@ export default { } } - return JSON.parse(this.value) + return this.value ? JSON.parse(this.value) : null }, set(v) { let value = null