diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js index 8d150a60c..f7783ba13 100644 --- a/chrome/content/zotero/xpcom/data/dataObject.js +++ b/chrome/content/zotero/xpcom/data/dataObject.js @@ -626,9 +626,7 @@ Zotero.DataObject.prototype.reload = Zotero.Promise.coroutine(function* (dataTyp } if (!dataTypes) { - dataTypes = Object.keys(this._loaded).filter( - val => this._loaded[val] - ); + dataTypes = Object.keys(this._loaded).filter(type => this._loaded[type]); } if (dataTypes && dataTypes.length) { @@ -644,7 +642,7 @@ Zotero.DataObject.prototype.reload = Zotero.Promise.coroutine(function* (dataTyp }); /** - * Checks wheteher a given data type has been loaded + * Checks whether a given data type has been loaded * * @param {String} [dataType=primaryData] Data type to check * @throws {Zotero.DataObjects.UnloadedDataException} If not loaded, unless the diff --git a/chrome/content/zotero/xpcom/data/dataObjects.js b/chrome/content/zotero/xpcom/data/dataObjects.js index a95f9cf25..ba444d3a1 100644 --- a/chrome/content/zotero/xpcom/data/dataObjects.js +++ b/chrome/content/zotero/xpcom/data/dataObjects.js @@ -473,16 +473,20 @@ Zotero.DataObjects.prototype.loadAll = Zotero.Promise.coroutine(function* (libra + (ids && ids.length == 1 ? this._ZDO_object : this._ZDO_objects) + " in " + library.name); - library.setDataLoading(this._ZDO_object); + if (!ids) { + library.setDataLoading(this._ZDO_object); + } let dataTypes = this.ObjectClass.prototype._dataTypes; for (let i = 0; i < dataTypes.length; i++) { yield this._loadDataTypeInLibrary(dataTypes[i], libraryID, ids); } - Zotero.debug(`Loaded all ${this._ZDO_objects} in ${library.name} in ${new Date() - t} ms`); + Zotero.debug(`Loaded ${this._ZDO_objects} in ${library.name} in ${new Date() - t} ms`); - library.setDataLoaded(this._ZDO_object); + if (!ids) { + library.setDataLoaded(this._ZDO_object); + } }); diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 4b07763bd..fdb8f8076 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -804,8 +804,8 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) { } if (!Zotero.Date.isSQLDate(value) && !Zotero.Date.isSQLDateTime(value)) { - Zotero.logError(`Discarding invalid ${field} '${value}' for ` - + `item ${this.libraryKey} in setField()`); + Zotero.logError(`Discarding invalid ${Zotero.ItemFields.getName(field)} '${value}' ` + + `for item ${this.libraryKey} in setField()`); return false; } }