fav.js: handle undefined favorites

This commit is contained in:
Zankaria 2025-02-12 23:09:22 +01:00
parent 40bbda5027
commit facd183304

View file

@ -23,7 +23,7 @@ function addBoard(){
add_favorites();
} //This adds the text inside the textbox to favorites, localStorage.favorites and the page
var favorites = JSON.parse(localStorage.favorites);
var favorites = localStorage.favorites ? JSON.parse(localStorage.favorites) : [];
Options.add_tab('fav-tab','star',_("Favorites"));
//Pregenerating list of boards