Properly trigger annotation position split if server says it's too long

This commit is contained in:
Martynas Bagdonas 2023-08-01 16:58:15 +03:00 committed by Dan Stillman
parent 12fde2dd4a
commit f18411c151

View file

@ -2086,7 +2086,7 @@ 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") {
if (message.startsWith("Annotation position is too long")) {
let item = Zotero.Items.getByLibraryAndKey(this.libraryID, key);
yield Zotero.Annotations.splitAnnotations(item);
}