Fix #8737: html: broken img tag is appeared when html_logo not set

This commit is contained in:
Takeshi KOMIYA
2021-01-24 15:36:52 +09:00
parent 0e6a2a9ebd
commit 03629b1832

View File

@@ -1162,14 +1162,14 @@ def setup_resource_paths(app: Sphinx, pagename: str, templatename: str,
# favicon_url
favicon = context.get('favicon')
if not isurl(favicon):
if favicon and not isurl(favicon):
context['favicon_url'] = pathto('_static/' + favicon, resource=True)
else:
context['favicon_url'] = favicon
# logo_url
logo = context.get('logo')
if not isurl(logo):
if logo and not isurl(logo):
context['logo_url'] = pathto('_static/' + logo, resource=True)
else:
context['logo_url'] = logo