Shave a couple of lines.
I probably did this for perf reasons, but it most likely doesn't make much of a difference.
This commit is contained in:
parent
90f75de0e2
commit
51358e328a
@ -181,20 +181,18 @@ Main =
|
||||
threads = []
|
||||
posts = []
|
||||
|
||||
for boardChild in board.children
|
||||
continue unless $.hasClass boardChild, 'thread'
|
||||
thread = new Thread boardChild.id[1..], g.BOARD
|
||||
for threadRoot in $$ '.board > .thread', board
|
||||
thread = new Thread threadRoot.id[1..], g.BOARD
|
||||
threads.push thread
|
||||
for threadChild in boardChild.children
|
||||
continue unless $.hasClass threadChild, 'postContainer'
|
||||
for postRoot in $$ '.thread > .postContainer', threadRoot
|
||||
try
|
||||
posts.push new Post threadChild, thread, g.BOARD
|
||||
posts.push new Post postRoot, thread, g.BOARD
|
||||
catch err
|
||||
# Skip posts that we failed to parse.
|
||||
unless errors
|
||||
errors = []
|
||||
errors.push
|
||||
message: "Parsing of Post No.#{threadChild.id.match(/\d+/)} failed. Post will be skipped."
|
||||
message: "Parsing of Post No.#{postRoot.id.match(/\d+/)} failed. Post will be skipped."
|
||||
error: err
|
||||
Main.handleErrors errors if errors
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user