diff --git a/chrome/content/zotero/xpcom/data_access.js b/chrome/content/zotero/xpcom/data_access.js index ae2eb048c..026c0f0c5 100644 --- a/chrome/content/zotero/xpcom/data_access.js +++ b/chrome/content/zotero/xpcom/data_access.js @@ -38,9 +38,9 @@ Zotero.Item.prototype._init = function(){ // // Public members for access by public methods -- do not access directly // - this._data = new Array(); - this._creators = new Zotero.Hash(); - this._itemData = new Array(); + this._data = []; + this._creators = []; + this._itemData = []; this._creatorsLoaded = false; this._itemDataLoaded = false; @@ -231,7 +231,7 @@ Zotero.Item.prototype.hasCreatorAt = function(pos){ this._loadCreators(); } - return this._creators.has(pos); + return !!this._creators[pos]; } @@ -245,10 +245,7 @@ Zotero.Item.prototype.getCreator = function(pos){ this._loadCreators(); } - if (!this._creators.items[pos]){ - return false; - } - return this._creators.items[pos]; + return this._creators[pos] ? this._creators[pos] : false; } @@ -259,7 +256,9 @@ Zotero.Item.prototype.getCreator = function(pos){ */ Zotero.Item.prototype.getCreators = function(){ var creators = []; - for (var i=0, len=this.numCreators(); i