From 2e8146a92f23814520f4e89578ef79e56355eef2 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 8 Apr 2013 09:52:29 +0200 Subject: [PATCH] Might as well go all the way to fix this. --- CHANGELOG.md | 2 +- src/features.coffee | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27e4ce5d5..9e889e623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -- Fix Thread Hiding initialization error, you'll have to clear all hidden threads in the settings window if you keep getting this bug. +- Fix Thread Hiding initialization error. # 3.0.0 - *2013-04-07* diff --git a/src/features.coffee b/src/features.coffee index 1fbcc8950..c633b2f32 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -1097,7 +1097,12 @@ ThreadHiding = hiddenThreads = ThreadHiding.db.get boardID: g.BOARD.ID defaultValue: {} - hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem "4chan-hide-t-#{g.BOARD}") or {} + # XXX tmp fix + try + hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem "4chan-hide-t-#{g.BOARD}") or {} + catch e + localStorage.setItem "4chan-hide-t-#{g.BOARD}", JSON.stringify {} + return ThreadHiding.syncCatalog() # Add threads that were hidden in the catalog. for threadID of hiddenThreadsOnCatalog