Add try/catch when loading plugin bootstrap.js

This commit is contained in:
Dan Stillman 2024-04-08 23:17:25 -04:00
parent 56c3635214
commit d654daae28

View file

@ -157,14 +157,19 @@ Zotero.Plugins = new function () {
scopes.set(addon.id, scope); scopes.set(addon.id, scope);
var uri = addon.getResourceURI().spec + 'bootstrap.js'; try {
Services.scriptloader.loadSubScriptWithOptions( let uri = addon.getResourceURI().spec + 'bootstrap.js';
uri, Services.scriptloader.loadSubScriptWithOptions(
{ uri,
target: scope, {
ignoreCache: true target: scope,
} ignoreCache: true
); }
);
}
catch (e) {
Zotero.logError(e);
}
} }