That... should fix those errors.

This commit is contained in:
Zixaphir 2014-01-09 19:25:47 -07:00
parent 0d29b42a02
commit b87825e558
5 changed files with 23 additions and 20 deletions

View File

@ -865,7 +865,7 @@
errors = [];
}
errors.push({
message: ['"', name, '" crashed on node ', this.type, ' No.', node, ' (', node.board, ').'].join(''),
message: ['"', name, '" crashed on node ', this.type, ' No.', node.ID, ' (', node.board, ').'].join(''),
error: err
});
}
@ -911,7 +911,7 @@
this.isClosed = false;
this.postLimit = false;
this.fileLimit = false;
g.threads[this.fullID] = board.threads[this.ID] = this;
g.threads[this.fullID] = board.threads[this] = this;
}
Thread.prototype.setPage = function(pageNum) {
@ -11962,16 +11962,17 @@
return Header.scrollToIfNeeded($('.board'));
},
parse: function(data) {
var errors, makePost, nodes, obj, post, posts, thread, threadRoot, _i, _len;
threadRoot = Build.thread(g.BOARD, data.shift(), true);
thread = new Thread(threadRoot, g.BOARD);
var OP, board, errors, makePost, nodes, obj, post, posts, thread, threadRoot, _i, _len;
board = g.BOARD;
threadRoot = Build.thread(board, OP = data.shift(), true);
thread = new Thread(OP.no, board);
nodes = [threadRoot];
posts = [];
errors = null;
makePost = function(postNode) {
var err;
try {
return posts.push(new Post(postNode, thread, g.BOARD));
return posts.push(new Post(postNode, thread, board));
} catch (_error) {
err = _error;
if (!errors) {
@ -11986,7 +11987,7 @@
makePost($('.opContainer', threadRoot));
for (_i = 0, _len = data.length; _i < _len; _i++) {
obj = data[_i];
posts.push(post = Build.postFromObject(obj));
nodes.push(post = Build.postFromObject(obj, board));
makePost(post);
}
if (errors) {

View File

@ -870,7 +870,7 @@
errors = [];
}
errors.push({
message: ['"', name, '" crashed on node ', this.type, ' No.', node, ' (', node.board, ').'].join(''),
message: ['"', name, '" crashed on node ', this.type, ' No.', node.ID, ' (', node.board, ').'].join(''),
error: err
});
}
@ -916,7 +916,7 @@
this.isClosed = false;
this.postLimit = false;
this.fileLimit = false;
g.threads[this.fullID] = board.threads[this.ID] = this;
g.threads[this.fullID] = board.threads[this] = this;
}
Thread.prototype.setPage = function(pageNum) {
@ -11951,16 +11951,17 @@
return Header.scrollToIfNeeded($('.board'));
},
parse: function(data) {
var errors, makePost, nodes, obj, post, posts, thread, threadRoot, _i, _len;
threadRoot = Build.thread(g.BOARD, data.shift(), true);
thread = new Thread(threadRoot, g.BOARD);
var OP, board, errors, makePost, nodes, obj, post, posts, thread, threadRoot, _i, _len;
board = g.BOARD;
threadRoot = Build.thread(board, OP = data.shift(), true);
thread = new Thread(OP.no, board);
nodes = [threadRoot];
posts = [];
errors = null;
makePost = function(postNode) {
var err;
try {
return posts.push(new Post(postNode, thread, g.BOARD));
return posts.push(new Post(postNode, thread, board));
} catch (_error) {
err = _error;
if (!errors) {
@ -11975,7 +11976,7 @@
makePost($('.opContainer', threadRoot));
for (_i = 0, _len = data.length; _i < _len; _i++) {
obj = data[_i];
posts.push(post = Build.postFromObject(obj));
nodes.push(post = Build.postFromObject(obj, board));
makePost(post);
}
if (errors) {

View File

@ -129,8 +129,9 @@ Navigate =
Header.scrollToIfNeeded $ '.board'
parse: (data) ->
threadRoot = Build.thread g.BOARD, data.shift(), true
thread = new Thread threadRoot, g.BOARD
board = g.BOARD
threadRoot = Build.thread board, OP = data.shift(), true
thread = new Thread OP.no, board
nodes = [threadRoot]
posts = []
@ -138,7 +139,7 @@ Navigate =
makePost = (postNode) ->
try
posts.push new Post postNode, thread, g.BOARD
posts.push new Post postNode, thread, board
catch err
# Skip posts that we failed to parse.
errors = [] unless errors
@ -149,7 +150,7 @@ Navigate =
makePost $('.opContainer', threadRoot)
for obj in data
posts.push post = Build.postFromObject obj
nodes.push post = Build.postFromObject obj, board
makePost post
Main.handleErrors errors if errors

View File

@ -21,7 +21,7 @@ class Callbacks
catch err
errors = [] unless errors
errors.push
message: ['"', name, '" crashed on node ', @type, ' No.', node, ' (', node.board, ').'].join('')
message: ['"', name, '" crashed on node ', @type, ' No.', node.ID, ' (', node.board, ').'].join('')
error: err
Main.handleErrors errors if errors

View File

@ -10,7 +10,7 @@ class Thread
@postLimit = false
@fileLimit = false
g.threads[@fullID] = board.threads[@ID] = @
g.threads[@fullID] = board.threads[@] = @
setPage: (pageNum) ->
icon = $ '.page-num', @OP.nodes.post