From f310c391623af6d94e8b0e8ddf3cf2e921b48fcb Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 11 Mar 2016 03:33:25 -0500 Subject: [PATCH] Remove Item::copy() Instead of creating a duplicate copy of the item with the same primary data and saving that, it's safer just to use clone() (which doesn't preserve ids) and apply changes to the main object. --- chrome/content/zotero/xpcom/data/item.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index cee972116..c0bd83fcb 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3721,17 +3721,6 @@ Zotero.Item.prototype.clone = function (libraryID, skipTags) { } -/** - * @return {Promise} - A copy of the item with primary data loaded - */ -Zotero.Item.prototype.copy = Zotero.Promise.coroutine(function* () { - var newItem = new Zotero.Item; - newItem.id = this.id; - yield newItem.loadPrimaryData(); - return newItem; -});; - - Zotero.Item.prototype._eraseData = Zotero.Promise.coroutine(function* (env) { Zotero.DB.requireTransaction();