diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/hush-hush.js b/hush-hush.js index cf292fe..a6b631c 100644 --- a/hush-hush.js +++ b/hush-hush.js @@ -138,7 +138,13 @@ async function findMessages(){ // Size is size of data (not metadata) and block hash document.getElementById('memUsage').innerText = getReadableFileSizeString(current + ((basicTextEncoder.encode(data)).length + block.length)) } - let metadata = JSON.parse(d.split("\n")[0]) + try{ + let metadata = JSON.parse(d.split("\n")[0]) + } + catch(e){ + console.debug(e) + return + } let data = d.substring(d.indexOf('\n') + 1); try{ diff --git a/index.html b/index.html index 36f3d67..2a9bdce 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@