mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Fix spatial JSON parsing in spreadsheet editor
This commit is contained in:
1 parent
a30efd64f8
commit
748856ffb1
1 file changed
+14
-3
+14
-3
@@ -95,9 +95,20 @@
|
||||
value = newArray as string[] | number[] | boolean[];
|
||||
}
|
||||
} else {
|
||||
const parsedValue = isSpatialType(column)
|
||||
? JSON.parse(stringValue)
|
||||
: parseValue(stringValue);
|
||||
let parsedValue = parseValue(stringValue);
|
||||
|
||||
if (isSpatialType(column)) {
|
||||
if (!stringValue?.trim()) {
|
||||
parsedValue = null;
|
||||
} else {
|
||||
try {
|
||||
parsedValue = JSON.parse(stringValue);
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (JSON.stringify(parsedValue) !== JSON.stringify(value)) {
|
||||
value = parsedValue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user