From bd79ab671d1d85348d963a352989cf065640c2a6 Mon Sep 17 00:00:00 2001 From: Bit Borealis Date: Sat, 19 Aug 2023 08:22:19 +0000 Subject: [PATCH] add another check to ensure qr size consistency --- js/main.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/js/main.js b/js/main.js index 60ea6a1..8047a54 100644 --- a/js/main.js +++ b/js/main.js @@ -308,15 +308,16 @@ function sanitizeQrTxt(lines) { if(lines[i].length !== 0) { linesOut.push(lines[i]); } - else { - if(i+1 === lines.length) { - return linesOut; - } - else { - throw "Unexpected empty line file." - } + else if(i+1 !== lines.length) { + throw "Unexpected empty line file." } } + for(let i=0;i