www

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

commit 39f7d0f3332aee3e976484b280a4d6874778a97f
parent ffb3823b4cf40b9a4183264ea86ce8f6c93e79ac
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 11 Mar 2016 03:12:23 -0500

Don't require objects to be saved before calling toJSON()

Diffstat:
Mchrome/content/zotero/xpcom/data/dataObject.js | 4----
1 file changed, 0 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js @@ -1175,10 +1175,6 @@ Zotero.DataObject.prototype.toResponseJSON = function (options) { Zotero.DataObject.prototype._preToJSON = function (options) { - if (!this._id) { - throw new Error(`${this._ObjectType} must be saved before running toJSON()`); - } - var env = { options }; env.mode = options.mode || 'new'; if (env.mode == 'patch') {