From 86bc20c4e9007908ec0fc0a6cc5abe41122a2c97 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 8 Aug 2014 17:02:34 -0400 Subject: [PATCH] Remove unnecessary conditionals in Zotero.DataObject constructor --- chrome/content/zotero/xpcom/data/dataObject.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js index a581686261..3d832348f4 100644 --- a/chrome/content/zotero/xpcom/data/dataObject.js +++ b/chrome/content/zotero/xpcom/data/dataObject.js @@ -29,26 +29,15 @@ Zotero.DataObject = function (objectType, objectTypePlural, dataTypes) { this._objectTypePlural = objectTypePlural ? objectTypePlural : objectType + 's'; this._dataTypes = dataTypes; - // Public members for access by public methods -- do not access directly - if (this._id === undefined) { - this._id = null; - } - if (this._libraryID === undefined) { - this._libraryID = null; - } - if (this._key === undefined) { - this._key = null; - } - + this._id = null; + this._libraryID = null; + this._key = null; this._dateAdded = null; this._dateModified = null; this._version = null; this._synced = null; this._identified = false; - if (this._dataTypes === undefined) { - throw new Error("this._dataTypes is undefined"); - } this._loaded = {}; for (let i=0; i