Allow passing arbitrary values to notifier events from DataObject.save()
item.saveTx({ notifierData: { foo: 1 } }); foo: 1 will be included in the extraData[id] object in notify().
This commit is contained in:
parent
4449da7e91
commit
69dec87aa6
1 changed files with 4 additions and 0 deletions
|
@ -830,6 +830,10 @@ Zotero.DataObject.prototype.save = Zotero.Promise.coroutine(function* (options)
|
|||
}
|
||||
|
||||
env.notifierData = {};
|
||||
// Pass along any 'notifierData' values
|
||||
if (env.options.notifierData) {
|
||||
Object.assign(env.notifierData, env.options.notifierData);
|
||||
}
|
||||
if (env.options.skipSelect) {
|
||||
env.notifierData.skipSelect = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue