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