From 45e2dbef2e5e7fc98ec5e257455d2e5da20ca305 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 28 Sep 2011 14:25:09 +0200 Subject: [PATCH] The ? was necessary. --- 4chan_x.user.js | 4 ++-- script.coffee | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index e0b830fb5..c8fa69a00 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1628,7 +1628,7 @@ return QR.submit(); }, quote: function(e, blank) { - var bq, i, id, qr, s, sel, ss, ta, text, tid, v, _base, _ref; + var bq, i, id, qr, s, sel, ss, ta, text, tid, v, _base, _ref, _ref2; if (e != null) { e.preventDefault(); } @@ -1637,7 +1637,7 @@ text = ">>" + id + "\n"; sel = getSelection(); bq = $.x('ancestor::blockquote', sel.anchorNode); - if (id === $.x('preceding-sibling::input', bq).name) { + if (id === ((_ref2 = $.x('preceding-sibling::input', bq)) != null ? _ref2.name : void 0)) { if (s = sel.toString().replace(/\n/g, '\n>')) { text += ">" + s + "\n"; } diff --git a/script.coffee b/script.coffee index 29f4aa5ae..2d6340813 100644 --- a/script.coffee +++ b/script.coffee @@ -1216,7 +1216,7 @@ QR = text = ">>#{id}\n" sel = getSelection() bq = $.x('ancestor::blockquote', sel.anchorNode) - if id == $.x('preceding-sibling::input', bq).name + if id == $.x('preceding-sibling::input', bq)?.name if s = sel.toString().replace /\n/g, '\n>' text += ">#{s}\n" {qr} = QR