From df21f89d0266b83731077c2d36dec20cc576a51e Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sun, 12 May 2013 23:10:32 +0200 Subject: [PATCH] Let's try to identify a bug. --- src/General/DataBoard.coffee | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/General/DataBoard.coffee b/src/General/DataBoard.coffee index 893de9edb..499ffccca 100644 --- a/src/General/DataBoard.coffee +++ b/src/General/DataBoard.coffee @@ -57,7 +57,16 @@ class DataBoard clean: -> for boardID of @data.boards - @deleteIfEmpty {boardID} + try + @deleteIfEmpty {boardID} + catch err + # XXX I get obscure reports of: + # "Unread" initialization crashed. TypeError: Object.keys called on non-object + # comming from here, gotta figure out why that happens. + Main.logError + message: "Couldn't deleteIfEmpty on:\n#{JSON.stringify @data}\n" + error: err + delete @data.boards[boardID] now = Date.now() if (@data.lastChecked or 0) < now - 2 * $.HOUR