factor for invalid proposal json

This commit is contained in:
gozzy 2023-03-22 10:03:27 +00:00
parent 5aef9e6d06
commit aef16eda5f

View File

@ -688,6 +688,13 @@ const actions = {
} }
} }
if (text.includes(`'`)) {
text = text.replaceAll(`'`, `"`)
}
if (text.includes(`" "`)) {
text = text.replace(`" "`, `", "`)
}
let title, description, rest let title, description, rest
try { try {
;({ title, description } = JSON.parse(text)) ;({ title, description } = JSON.parse(text))