From 3a01469dc19d643acbc1bf953c4e185293aa9df9 Mon Sep 17 00:00:00 2001 From: bbielsa Date: Sat, 31 Jan 2015 10:36:02 -0500 Subject: [PATCH] Fixed add_favorites to append to the correct element Issue #346 https://github.com/ctrlcctrlv/infinity/issues/346#issuecomment-71119100 --- js/favorites.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/favorites.js b/js/favorites.js index acef9c7e..e4d89086 100644 --- a/js/favorites.js +++ b/js/favorites.js @@ -41,15 +41,15 @@ function handle_boards(data) { return $('').append(' [ '+boards.join(" / ")+' ] '); } else { return $(''); - } + } } function add_favorites() { - $('.favorite-boards').remove(); - + $('.favorite-boards').empty(); + var boards = handle_boards(localStorage.favorites); - $('.boardlist').append(boards); + $('.favorite-boards').append(boards); }; if (active_page == 'thread' || active_page == 'index' || active_page == 'catalog') {