Await plugin bootstrap methods
This commit is contained in:
parent
027060ba86
commit
ffd6a988e1
1 changed files with 4 additions and 0 deletions
|
@ -143,6 +143,10 @@ Zotero.Plugins = new function () {
|
|||
let result;
|
||||
try {
|
||||
result = func.call(scope, params, reason);
|
||||
// If bootstrap method returns a promise, wait for it
|
||||
if (result && result.then) {
|
||||
await result;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.logError(`Error running bootstrap method '${method}' on ${id}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue