Skip to content

Commit

Permalink
fix: Avoid failing on empty strings for URL values
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Jan 18, 2024
1 parent 9df1541 commit 852df21
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -80,7 +80,7 @@ export default {
}
}
return JSON.parse(this.value)
return this.value ? JSON.parse(this.value) : null
},
set(v) {
let value = null
Expand Down

0 comments on commit 852df21

Please sign in to comment.