Skip to content

Commit

Permalink
Fix a bug that prevented tools from being removed from favorites
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenzocaputo committed Dec 15, 2024
1 parent 4243b2b commit c1f90c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/popup/uiHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ function createToolsList(toolsList, settings, favTools){
const targetId = e.target.id;
if(targetId === "add-fav") {
browser.storage.local.get("fav").then( (result) => {
const favTools = result.fav || Array();
let favTools = result.fav || Array();
if(favTools) {
favTools.push(node.name);
} else {
Expand All @@ -553,7 +553,7 @@ function createToolsList(toolsList, settings, favTools){
});
} else if(targetId === "rem-fav") {
browser.storage.local.get("fav").then( (result) => {
const favTools = result.fav || Array();
let favTools = result.fav || Array();
if(favTools) {
favTools = favTools.filter(item => item != node.name);
}
Expand Down

0 comments on commit c1f90c9

Please sign in to comment.