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

This commit is contained in:
Dan Stillman 2016-03-11 03:12:23 -05:00
parent ffb3823b4c
commit 39f7d0f333

View File

@ -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') {