Fix quote preview bug when reply is in index data but no thread object exists. #1478

This commit is contained in:
ccd0 2017-08-24 16:34:03 -07:00
parent 9b9599ab7e
commit 8a14c2b90d

View File

@ -5,9 +5,8 @@ class Fetcher
return
# 4chan X catalog data
if (post = Index.replyData?["#{@boardID}.#{@postID}"])
if (post = Index.replyData?["#{@boardID}.#{@postID}"]) and (thread = g.threads["#{@boardID}.#{@threadID}"])
board = g.boards[@boardID]
thread = g.threads["#{@boardID}.#{@threadID}"]
post = new Post Build.postFromObject(post, @boardID), thread, board
post.isFetchedQuote = true
Main.callbackNodes 'Post', [post]