mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-07 06:57:12 -04:00
fix includes
This commit is contained in:
parent
90c66bbc47
commit
ebc7ba0761
1 changed files with 1 additions and 2 deletions
|
@ -23,7 +23,7 @@ export class COperationLi extends HTMLElement {
|
|||
this.includeStarIcon = includeStarIcon;
|
||||
|
||||
this.config = this.app.operations[name];
|
||||
this.isFavourite = this.app.isLocalStorageAvailable() && localStorage.favourites?.includes(name);
|
||||
this.isFavourite = this.app.isLocalStorageAvailable() && JSON.parse(localStorage.favourites).indexOf(name) >= 0;
|
||||
|
||||
this.build();
|
||||
|
||||
|
@ -63,7 +63,6 @@ export class COperationLi extends HTMLElement {
|
|||
*/
|
||||
handleClick(e) {
|
||||
if (e.target === this.querySelector("i.star-icon")) {
|
||||
this.querySelector("li").classList.add("favourite");
|
||||
this.app.addFavourite(this.name);
|
||||
}
|
||||
if (e.target === this.querySelector("i.remove-icon")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue