From 4db61b8dc74f7ee740e35e7ef015fc691a9ae643 Mon Sep 17 00:00:00 2001 From: Fletcher Hazlehurst Date: Sat, 26 Dec 2020 14:07:24 -0700 Subject: [PATCH] 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. --- chrome/content/zotero/xpcom/attachments.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 9a63a11fc1..d896bf325d 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -562,8 +562,8 @@ Zotero.Attachments = new function(){ attachmentItem.attachmentPath = 'storage:' + options.filename; await attachmentItem.saveTx( Object.assign( - options.saveOptions || {}, - { notifierQueue } + { notifierQueue }, + options.saveOptions || {} ) );