Fix some hasty copy-paste gone wrong.

This commit is contained in:
Mayhem 2013-11-04 01:21:04 +01:00
parent b56a987600
commit 09daa29220

View File

@ -197,17 +197,16 @@ Index =
else else
thread = new Thread threadData.no, g.BOARD thread = new Thread threadData.no, g.BOARD
threads.push thread threads.push thread
# postRoots = $$ '.thread > .postContainer', threadRoot continue if thread.ID of thread.posts
# for postRoot in postRoots when postRoot.id.match(/\d+/)[0] not of thread.posts
OPRoot = $ '.opContainer', threadRoot
continue if OPRoot.id.match(/\d+/)[0] of thread.posts
try try
posts.push new Post OPRoot, thread, g.BOARD posts.push new Post $('.opContainer', threadRoot), thread, g.BOARD
catch err catch err
# Skip posts that we failed to parse. # Skip posts that we failed to parse.
Main.handleErrors errors = [] unless errors
message: "Parsing of Post No.#{postRoot.id.match /\d+/} failed. Post will be skipped." errors.push
message: "Parsing of Post No.#{thread} failed. Post will be skipped."
error: err error: err
Main.handleErrors errors if errors
# Add the threads and <hr>s in a container to make sure all features work. # Add the threads and <hr>s in a container to make sure all features work.
$.nodes Index.nodes $.nodes Index.nodes
@ -231,7 +230,7 @@ Index =
# Skip posts that we failed to parse. # Skip posts that we failed to parse.
errors = [] unless errors errors = [] unless errors
errors.push errors.push
message: "Parsing of Post No.#{postRoot.id.match /\d+/} failed. Post will be skipped." message: "Parsing of Post No.#{data.no} failed. Post will be skipped."
error: err error: err
$.add threadRoot, nodes $.add threadRoot, nodes