From 2bb853687dc7158a82cd117de9fcc91558028c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Krzy=C5=9Bk=C3=B3w?= Date: Thu, 27 Apr 2023 00:05:02 +0200 Subject: [PATCH] Fixed social plugin crash when only code font present --- material/plugins/social/plugin.py | 2 +- src/plugins/social/plugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/plugins/social/plugin.py b/material/plugins/social/plugin.py index e70758268..9d222eff8 100644 --- a/material/plugins/social/plugin.py +++ b/material/plugins/social/plugin.py @@ -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" diff --git a/src/plugins/social/plugin.py b/src/plugins/social/plugin.py index e70758268..9d222eff8 100644 --- a/src/plugins/social/plugin.py +++ b/src/plugins/social/plugin.py @@ -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"