Skip to content

Commit

Permalink
🚑 Fix issue with new api addon shema
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebclem committed Jul 12, 2022
1 parent 9de8584 commit 2ae60ea
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,12 @@ function getAddonList() {
statusTools.setStatus(status);
}
let addons = result.body.data.addons;
let installed = [];
for (let current of addons) {
if (current.installed === true) {
installed.push({ slug: current.slug, name: current.name })
}
}
installed.sort((a, b) => {
addons.sort((a, b) => {
let textA = a.name.toUpperCase();
let textB = b.name.toUpperCase();
return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
});
resolve(installed);
resolve(addons);
})
.catch((error) => {
statusTools.setError(`Fail to fetch addons list (${error.message})`, 1);
Expand Down

0 comments on commit 2ae60ea

Please sign in to comment.