diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index ab60603b70..360b6bd66b 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -4046,10 +4046,15 @@ Zotero.Item.prototype.toJSON = function (options = {}) { obj.deleted = deleted ? 1 : 0; } - obj.dateAdded = Zotero.Date.sqlToISO8601(this.dateAdded); - obj.dateModified = Zotero.Date.sqlToISO8601(this.dateModified); if (obj.accessDate) obj.accessDate = Zotero.Date.sqlToISO8601(obj.accessDate); + if (this.dateAdded) { + obj.dateAdded = Zotero.Date.sqlToISO8601(this.dateAdded); + } + if (this.dateModified) { + obj.dateModified = Zotero.Date.sqlToISO8601(this.dateModified); + } + return this._postToJSON(env); }