Fix most likely cause of thread watcher data corruption. #341

This was feeding bad results to ThreadWatcher.set404 when the g.THREADID was falsy.
This commit is contained in:
ccd0 2015-02-26 22:03:59 -08:00
parent 6312cfaf20
commit 726e3d4e01

View File

@ -50,8 +50,8 @@ class DataBoard
get: ({boardID, threadID, postID, defaultValue}) ->
if board = @data.boards[boardID]
unless threadID
if postID
unless threadID?
if postID?
for ID, thread in board
if postID of thread
val = thread[postID]
@ -59,7 +59,7 @@ class DataBoard
else
val = board
else if thread = board[threadID]
val = if postID
val = if postID?
thread[postID]
else
thread