www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 86bc20c4e9007908ec0fc0a6cc5abe41122a2c97
parent 380668cc60c6c543d1a8cbb6dda2fe4d0b599c18
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  8 Aug 2014 17:02:34 -0400

Remove unnecessary conditionals in Zotero.DataObject constructor

Diffstat:
Mchrome/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 @@ -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<this._dataTypes.length; i++) { this._loaded[this._dataTypes[i]] = false;