1
0
Fork 0
mirror of synced 2024-07-07 07:15:43 +12:00

Merge pull request #13698 from Budibase/fix/editing-rows-in-modals

Fix JSON error when editing rows in modal that contain unset attachment fields
This commit is contained in:
Andrew Kingston 2024-05-15 16:49:49 +01:00 committed by GitHub
commit e97d9fc71f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -14,9 +14,8 @@
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
import Editor from "../../integration/QueryEditor.svelte"
export let defaultValue
export let meta
export let value = defaultValue || (meta.type === "boolean" ? false : "")
export let value
export let readonly
export let error

View file

@ -242,7 +242,7 @@ export async function outputProcessing<T extends Row[] | Row>(
}
return attachment
}
if (typeof row[property] === "string") {
if (typeof row[property] === "string" && row[property].length) {
row[property] = JSON.parse(row[property])
}
if (Array.isArray(row[property])) {