From f393ba82a570c0b0e4989cec6561a907ab3148f2 Mon Sep 17 00:00:00 2001 From: James Campos Date: Mon, 5 Sep 2011 17:25:14 -0700 Subject: [PATCH] rm row if row --- 4chan_x.user.js | 8 ++++++-- script.coffee | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index a727c4712..e8016fb14 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1495,14 +1495,18 @@ $.extend($('a.error', QR.qr), data); tc = data.textContent; if (tc === 'Error: Duplicate file entry detected.') { - $.rm(row); + if (row) { + $.rm(row); + } setTimeout(QR.submit, 1000); } else if (tc === 'You seem to have mistyped the verification.') { setTimeout(QR.submit, 1000); } return; } - $.rm(row); + if (row) { + $.rm(row); + } if (conf['Persistent QR'] || ((_ref2 = $('#files input', QR.qr)) != null ? _ref2.files.length : void 0)) { QR.reset(); } else { diff --git a/script.coffee b/script.coffee index 9ad931f59..8f82d4ca2 100644 --- a/script.coffee +++ b/script.coffee @@ -1158,12 +1158,12 @@ QR = $.extend $('a.error', QR.qr), data tc = data.textContent if tc is 'Error: Duplicate file entry detected.' - $.rm row + $.rm row if row setTimeout QR.submit, 1000 else if tc is 'You seem to have mistyped the verification.' setTimeout QR.submit, 1000 return - $.rm row + $.rm row if row if conf['Persistent QR'] or $('#files input', QR.qr)?.files.length QR.reset() else