mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-05-18 13:47:08 -04:00
Fix
This commit is contained in:
@@ -80,6 +80,15 @@ export function urlBase64ToUint8Array(base64String: string) {
|
||||
}
|
||||
|
||||
export function cleanDoc(doc: JSONContent) {
|
||||
try {
|
||||
return _cleanDoc(doc)
|
||||
} catch (e) {
|
||||
console.error('error cleaning doc', doc, e)
|
||||
return doc
|
||||
}
|
||||
}
|
||||
|
||||
function _cleanDoc(doc: JSONContent) {
|
||||
if (!doc || !Array.isArray(doc.content)) return doc;
|
||||
|
||||
let content = [...doc.content];
|
||||
|
||||
Reference in New Issue
Block a user