From c726a8b3075a100c38dc56346719c37897fd8bbe Mon Sep 17 00:00:00 2001 From: bouncepaw Date: Sat, 20 Feb 2021 21:21:10 +0500 Subject: [PATCH] Fix the error when previewing --- http_mutators.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/http_mutators.go b/http_mutators.go index 3e29066..c2410ec 100644 --- a/http_mutators.go +++ b/http_mutators.go @@ -179,13 +179,12 @@ func handlerUploadText(w http.ResponseWriter, rq *http.Request) { if action != "Preview" { hop, errtitle = shroom.UploadText(h, []byte(textData), u) - } - - if hop.HasErrors() { - HttpErr(w, http.StatusForbidden, hyphaName, - errtitle, - hop.FirstErrorText()) - return + if hop.HasErrors() { + HttpErr(w, http.StatusForbidden, hyphaName, + errtitle, + hop.FirstErrorText()) + return + } } if action == "Preview" {