Skip to content

Commit 2bb8536

Browse files
committed
Fixed social plugin crash when only code font present
1 parent b9db2f7 commit 2bb8536

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

material/plugins/social/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def _load_font(self, config):
388388

389389
# Retrieve from theme (default: Roboto)
390390
theme = config.theme
391-
if theme["font"]:
391+
if isinstance(theme["font"], dict) and "text" in theme["font"]:
392392
name = theme["font"]["text"]
393393
else:
394394
name = "Roboto"

src/plugins/social/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def _load_font(self, config):
388388

389389
# Retrieve from theme (default: Roboto)
390390
theme = config.theme
391-
if theme["font"]:
391+
if isinstance(theme["font"], dict) and "text" in theme["font"]:
392392
name = theme["font"]["text"]
393393
else:
394394
name = "Roboto"

0 commit comments

Comments
 (0)