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);
var uri = addon.getResourceURI().spec + 'bootstrap.js';
Services.scriptloader.loadSubScriptWithOptions(
uri,
{
target: scope,
ignoreCache: true
}
);
try {
let uri = addon.getResourceURI().spec + 'bootstrap.js';
Services.scriptloader.loadSubScriptWithOptions(
uri,
{
target: scope,
ignoreCache: true
}
);
}
catch (e) {
Zotero.logError(e);
}
}