forked from leftypol/leftypol
fav.js: handle undefined favorites
This commit is contained in:
parent
40bbda5027
commit
facd183304
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue