diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 5e0713f62..31c2abea1 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -197,17 +197,16 @@ Index = else thread = new Thread threadData.no, g.BOARD threads.push thread - # postRoots = $$ '.thread > .postContainer', threadRoot - # 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 + continue if thread.ID of thread.posts try - posts.push new Post OPRoot, thread, g.BOARD + posts.push new Post $('.opContainer', threadRoot), thread, g.BOARD catch err # Skip posts that we failed to parse. - Main.handleErrors - message: "Parsing of Post No.#{postRoot.id.match /\d+/} failed. Post will be skipped." + errors = [] unless errors + errors.push + message: "Parsing of Post No.#{thread} failed. Post will be skipped." error: err + Main.handleErrors errors if errors # Add the threads and