Do not modify saveOptions argument since it may be used again

If we add the notifier queue, another save function will use that queue
but not necessarily know that it needs to commit. Instead, we only use
the notifier queue for this function.
This commit is contained in:
Fletcher Hazlehurst 2020-12-26 14:07:24 -07:00
parent 98a75931b0
commit 4db61b8dc7

View file

@ -562,8 +562,8 @@ Zotero.Attachments = new function(){
attachmentItem.attachmentPath = 'storage:' + options.filename;
await attachmentItem.saveTx(
Object.assign(
options.saveOptions || {},
{ notifierQueue }
{ notifierQueue },
options.saveOptions || {}
)
);