Split annotations on sync error

Follow-up to b7f26c47c1
This commit is contained in:
Dan Stillman 2022-03-01 05:08:36 -05:00
parent a10fcfd58e
commit 1cc03492c4

View file

@ -2076,6 +2076,12 @@ Zotero.Sync.Data.Engine.prototype._checkObjectUploadError = Zotero.Promise.corou
}
}
}
// Split old annotations before we were splitting them automatically in the PDF reader
if (message == "Annotation position is too long") {
let item = Zotero.Items.getByLibraryAndKey(this.libraryID, key);
yield Zotero.Annotations.splitAnnotations(item);
}
}
else if (code == 403) {
// If we get a 403 for a local group attachment, check the group permissions to confirm