Skip to content

Commit

Permalink
Fix sphinx-doc#8737: html: broken img tag is appeared when html_logo …
Browse files Browse the repository at this point in the history
…not set
  • Loading branch information
tk0miya committed Jan 24, 2021
1 parent 0e6a2a9 commit 03629b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 03629b1

Please sign in to comment.