Check that header string exists

main
Bob Mottram 2020-10-31 13:01:53 +00:00
parent 970e986cf6
commit 10f7cb05a9
1 changed files with 6 additions and 2 deletions

View File

@ -6022,7 +6022,7 @@ def headerButtonsFrontScreen(translate: {},
authorized: bool) -> str:
"""Returns the header buttons for the front page of a news instance
"""
headerStr = ' <div class="frontPageMobileButtons">\n'
headerStr = ''
if nickname == 'news':
buttonFeatures = 'buttonMobile'
buttonNewswire = 'buttonMobile'
@ -6062,7 +6062,11 @@ def headerButtonsFrontScreen(translate: {},
'"><button class="buttonMobile">' + \
'<span>' + translate['Login'] + \
'</span></button></a>\n'
headerStr += ' </div>\n'
if headerStr:
headerStr = \
' <div class="frontPageMobileButtons">\n' + \
headerStr + ' </div>\n'
return headerStr