Fix JSON error when editing rows in modal that contain unset attachments
This commit is contained in:
parent
756504a8a1
commit
3d5795e934
|
@ -14,9 +14,8 @@
|
||||||
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
|
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
|
||||||
import Editor from "../../integration/QueryEditor.svelte"
|
import Editor from "../../integration/QueryEditor.svelte"
|
||||||
|
|
||||||
export let defaultValue
|
|
||||||
export let meta
|
export let meta
|
||||||
export let value = defaultValue || (meta.type === "boolean" ? false : "")
|
export let value
|
||||||
export let readonly
|
export let readonly
|
||||||
export let error
|
export let error
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ export async function outputProcessing<T extends Row[] | Row>(
|
||||||
}
|
}
|
||||||
return attachment
|
return attachment
|
||||||
}
|
}
|
||||||
if (typeof row[property] === "string") {
|
if (typeof row[property] === "string" && row[property].length) {
|
||||||
row[property] = JSON.parse(row[property])
|
row[property] = JSON.parse(row[property])
|
||||||
}
|
}
|
||||||
if (Array.isArray(row[property])) {
|
if (Array.isArray(row[property])) {
|
||||||
|
|
Loading…
Reference in New Issue