Fixed social plugin crash when only code font present

This commit is contained in:
Kamil Krzyśków 2023-04-27 00:05:02 +02:00
parent b9db2f734c
commit 2bb853687d
2 changed files with 2 additions and 2 deletions

View File

@ -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"

View File

@ -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"