commit f310c391623af6d94e8b0e8ddf3cf2e921b48fcb parent ae6d560a66a4d8e8280b369b272446f0499cc014 Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 11 Mar 2016 03:33:25 -0500 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. Diffstat:
| M | chrome/content/zotero/xpcom/data/item.js | | | 11 | ----------- |
1 file changed, 0 insertions(+), 11 deletions(-)
diff --git 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<Zotero.Item>} - 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();