From 10f7cb05a9bed163dff13c7eb43e18ef8ca5352a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 31 Oct 2020 13:01:53 +0000 Subject: [PATCH] Check that header string exists --- webinterface.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webinterface.py b/webinterface.py index 6a17e3f3..1b66aa67 100644 --- a/webinterface.py +++ b/webinterface.py @@ -6022,7 +6022,7 @@ def headerButtonsFrontScreen(translate: {}, authorized: bool) -> str: """Returns the header buttons for the front page of a news instance """ - headerStr = '
\n' + headerStr = '' if nickname == 'news': buttonFeatures = 'buttonMobile' buttonNewswire = 'buttonMobile' @@ -6062,7 +6062,11 @@ def headerButtonsFrontScreen(translate: {}, '">\n' - headerStr += '
\n' + + if headerStr: + headerStr = \ + '
\n' + \ + headerStr + '
\n' return headerStr