From 2bc6d2fd04027a9143595e64af421cb94ecda908 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 16 Dec 2012 12:51:13 +0100 Subject: [PATCH] Fix #864 --- 4chan_x.user.js | 6 ++++-- script.coffee | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 8058b60bb..8030fba6c 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -4312,7 +4312,7 @@ return Main.callbacks.push(this.node); }, node: function(post) { - var a, board, deadlink, id, m, postBoard, quote, _i, _len, _ref; + var a, board, deadlink, id, m, postBoard, quote, _i, _len, _ref, _ref1; if (post.isInlined && !post.isCrosspost) { return; } @@ -4327,7 +4327,9 @@ a = $.el('a', { textContent: "" + quote + "\u00A0(Dead)" }); - id = quote.match(/\d+$/)[0]; + if (!(id = (_ref1 = quote.match(/\d+$/)) != null ? _ref1[0] : void 0)) { + continue; + } if (m = quote.match(/^>>>\/([a-z\d]+)/)) { board = m[1]; } else if (postBoard) { diff --git a/script.coffee b/script.coffee index d7d5b96bb..f240fa326 100644 --- a/script.coffee +++ b/script.coffee @@ -3537,7 +3537,7 @@ Quotify = # \u00A0 is nbsp textContent: "#{quote}\u00A0(Dead)" - id = quote.match(/\d+$/)[0] + continue unless id = quote.match(/\d+$/)?[0] if m = quote.match /^>>>\/([a-z\d]+)/ board = m[1]