mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed social plugin crash when only code font present
This commit is contained in:
parent
b9db2f734c
commit
2bb853687d
@ -388,7 +388,7 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
|
||||
|
||||
# Retrieve from theme (default: Roboto)
|
||||
theme = config.theme
|
||||
if theme["font"]:
|
||||
if isinstance(theme["font"], dict) and "text" in theme["font"]:
|
||||
name = theme["font"]["text"]
|
||||
else:
|
||||
name = "Roboto"
|
||||
|
@ -388,7 +388,7 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
|
||||
|
||||
# Retrieve from theme (default: Roboto)
|
||||
theme = config.theme
|
||||
if theme["font"]:
|
||||
if isinstance(theme["font"], dict) and "text" in theme["font"]:
|
||||
name = theme["font"]["text"]
|
||||
else:
|
||||
name = "Roboto"
|
||||
|
Loading…
Reference in New Issue
Block a user