From c81f017cdeb15e646b4213bf91591bcfe13bf64f Mon Sep 17 00:00:00 2001
From: Kevin Froman
Date: Mon, 9 Nov 2020 00:09:00 +0000
Subject: [PATCH] Fix upload attempt to undefined
---
index.html | 4 ++--
js/message-creator.js | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 9480787..01103ef 100644
--- a/index.html
+++ b/index.html
@@ -36,7 +36,7 @@
lycan is a message board program that utilizes the Onionr network.
posts are rate-limited and protected using a partial hash collision proof of work function.
@@ -77,7 +77,7 @@
-
Markdown and limited HTML is supported.
+
markdown and limited HTML is supported.
diff --git a/js/message-creator.js b/js/message-creator.js
index 1d5c223..009c07d 100644
--- a/js/message-creator.js
+++ b/js/message-creator.js
@@ -48,6 +48,13 @@ async function doUpload(data){
}, 1000)
return
}
+ const curNode = getCurrentNode()
+ if (typeof curNode == "undefined"){
+ setTimeout(function(){
+ doUpload(data)
+ }, 1000)
+ return
+ }
let decoder = new TextDecoder("utf-8")
let uploadTimeout = setTimeout(function(){