diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js index 7f5995230..d7610a775 100644 --- a/chrome/content/zotero/xpcom/server_connector.js +++ b/chrome/content/zotero/xpcom/server_connector.js @@ -164,17 +164,17 @@ Zotero.Server.Connector.SaveSession.prototype.update = async function (libraryID }; Zotero.Server.Connector.SaveSession.prototype._addObjects = async function (objectType, objects) { - // Update the objects with the current target data, in case it changed since the save began - await this._updateObjects({ - [objectType]: objects - }); - if (!this._objects[objectType]) { this._objects[objectType] = new Set(); } for (let object of objects) { this._objects[objectType].add(object); } + + // Update the objects with the current target data, in case it changed since the save began + await this._updateObjects({ + [objectType]: objects + }); }; /**