Looks like some users had a null value on a board with the Unread features.
No idea how that could have happened.
This commit is contained in:
parent
fd3d898f75
commit
215761557d
@ -56,17 +56,13 @@ class DataBoard
|
|||||||
val or defaultValue
|
val or defaultValue
|
||||||
|
|
||||||
clean: ->
|
clean: ->
|
||||||
for boardID of @data.boards
|
for boardID, val of @data.boards
|
||||||
try
|
# XXX tmp fix for users that had the `null`
|
||||||
@deleteIfEmpty {boardID}
|
# value for a board with the Unread features:
|
||||||
catch err
|
unless val
|
||||||
# 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]
|
delete @data.boards[boardID]
|
||||||
|
else
|
||||||
|
@deleteIfEmpty {boardID}
|
||||||
|
|
||||||
now = Date.now()
|
now = Date.now()
|
||||||
if (@data.lastChecked or 0) < now - 2 * $.HOUR
|
if (@data.lastChecked or 0) < now - 2 * $.HOUR
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user