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)
|
# Retrieve from theme (default: Roboto)
|
||||||
theme = config.theme
|
theme = config.theme
|
||||||
if theme["font"]:
|
if isinstance(theme["font"], dict) and "text" in theme["font"]:
|
||||||
name = theme["font"]["text"]
|
name = theme["font"]["text"]
|
||||||
else:
|
else:
|
||||||
name = "Roboto"
|
name = "Roboto"
|
||||||
|
@ -388,7 +388,7 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
|
|||||||
|
|
||||||
# Retrieve from theme (default: Roboto)
|
# Retrieve from theme (default: Roboto)
|
||||||
theme = config.theme
|
theme = config.theme
|
||||||
if theme["font"]:
|
if isinstance(theme["font"], dict) and "text" in theme["font"]:
|
||||||
name = theme["font"]["text"]
|
name = theme["font"]["text"]
|
||||||
else:
|
else:
|
||||||
name = "Roboto"
|
name = "Roboto"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user