mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
Local API: Resolve 500 error on single item export (#5560)
This commit is contained in:
parent
2e3deb0a21
commit
05e4982245
1 changed files with 5 additions and 2 deletions
|
|
@ -978,11 +978,14 @@ async function citeprocToHTML(itemOrItems, searchParams, asCitationList) {
|
|||
/**
|
||||
* Export items to a string with the given translator.
|
||||
*
|
||||
* @param {Zotero.Item[]} items
|
||||
* @param {Zotero.Item|Zotero.Item[]} itemOrItems
|
||||
* @param {String} translatorID
|
||||
* @returns {Promise<String>}
|
||||
*/
|
||||
function exportItems(items, translatorID) {
|
||||
function exportItems(itemOrItems, translatorID) {
|
||||
let items = Array.isArray(itemOrItems)
|
||||
? itemOrItems
|
||||
: [itemOrItems];
|
||||
return new Promise((resolve, reject) => {
|
||||
let translation = new Zotero.Translate.Export();
|
||||
translation.setItems(items.slice());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue