mirror of
https://github.com/gchq/CyberChef
synced 2025-12-10 13:23:25 +00:00
Introduced use of conditional chaining operator
This commit is contained in:
@@ -342,7 +342,7 @@ class App {
|
||||
let favourites;
|
||||
|
||||
if (this.isLocalStorageAvailable()) {
|
||||
favourites = localStorage.favourites && localStorage.favourites.length > 2 ?
|
||||
favourites = localStorage?.favourites?.length > 2 ?
|
||||
JSON.parse(localStorage.favourites) :
|
||||
this.dfavourites;
|
||||
favourites = this.validFavourites(favourites);
|
||||
|
||||
Reference in New Issue
Block a user