From fb699eac64063f10e270b867700d4d35b62af2a4 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Fri, 17 May 2013 22:26:19 +0200 Subject: [PATCH] I'm still getting `Object.keys called on non-object` from here. wtf --- src/General/DataBoard.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/General/DataBoard.coffee b/src/General/DataBoard.coffee index 1d6d30a3f..fcf943a1c 100644 --- a/src/General/DataBoard.coffee +++ b/src/General/DataBoard.coffee @@ -59,10 +59,8 @@ class DataBoard for boardID, val of @data.boards # XXX tmp fix for users that had the `null` # value for a board with the Unread features: - unless val - delete @data.boards[boardID] - else - @deleteIfEmpty {boardID} + @data.boards[boardID] or= {} + @deleteIfEmpty {boardID} now = Date.now() if (@data.lastChecked or 0) < now - 2 * $.HOUR