From 01f04802f05da3c69d557d542f30bd9af286708d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 5 May 2015 14:39:24 -0400 Subject: [PATCH] Fix loadAllData() on regular items without notes Set a flag when setting the item type that instructs loadAllData() whether to attempt to call loadNote() --- .../content/zotero/xpcom/data/dataObject.js | 6 ++++- chrome/content/zotero/xpcom/data/item.js | 5 ++++ test/tests/dataObjectTest.js | 26 +++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js index 555bec4b6..728e85175 100644 --- a/chrome/content/zotero/xpcom/data/dataObject.js +++ b/chrome/content/zotero/xpcom/data/dataObject.js @@ -51,6 +51,7 @@ Zotero.DataObject = function () { this._parentKey = null; this._loaded = {}; + this._skipDataTypeLoad = {}; this._markAllDataTypeLoadStates(false); this._clearChanged(); @@ -471,7 +472,10 @@ Zotero.DataObject.prototype._loadDataType = function (dataType, reload) { Zotero.DataObject.prototype.loadAllData = function (reload) { let loadPromises = new Array(this._dataTypes.length); for (let i=0; i