Fix error loading plugin scope after 6a2fcd6898
`AddonManager.getActiveAddons(["extension"])` doesn't return fully loaded addon objects if `getAllAddons()` hasn't been called
This commit is contained in:
parent
987b7ea952
commit
0d70925816
1 changed files with 4 additions and 1 deletions
|
@ -46,8 +46,11 @@ Zotero.Plugins = new function () {
|
|||
this.init = async function () {
|
||||
this._addonObserver.init();
|
||||
|
||||
var { addons } = await AddonManager.getActiveAddons(["extension"]);
|
||||
// In Fx102, getActiveAddons(["extension"]) doesn't always return fully loaded addon objects
|
||||
// if getAllAddons() hasn't been called, so use getAllAddons() and do the checks ourselves
|
||||
var addons = await AddonManager.getAllAddons();
|
||||
for (let addon of addons) {
|
||||
if (addon.type != 'extension' || !addon.isActive) continue;
|
||||
addonVersions.set(addon.id, addon.version);
|
||||
_loadScope(addon);
|
||||
setDefaultPrefs(addon);
|
||||
|
|
Loading…
Reference in a new issue