Return the new item from ZoteroPane.duplicateSelectedItem()
This commit is contained in:
parent
4566ff30f5
commit
9b231169b2
1 changed files with 3 additions and 1 deletions
|
@ -1614,7 +1614,7 @@ var ZoteroPane = new function()
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Promise}
|
* @return {Promise<Zotero.Item>} - The new Zotero.Item
|
||||||
*/
|
*/
|
||||||
this.duplicateSelectedItem = Zotero.Promise.coroutine(function* () {
|
this.duplicateSelectedItem = Zotero.Promise.coroutine(function* () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -1636,6 +1636,8 @@ var ZoteroPane = new function()
|
||||||
});
|
});
|
||||||
|
|
||||||
yield self.selectItem(newItem.id);
|
yield self.selectItem(newItem.id);
|
||||||
|
|
||||||
|
return newItem;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue