mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Fix spatial JSON parsing in spreadsheet editor
This commit is contained in:
+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