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 <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Jan 18, 2024
1 parent a14b4f3 commit f3ff8c4
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 f3ff8c4

Please sign in to comment.