Skip to content

Commit d8a0e36

Browse files
committed
Fixed regression in config deprecation in social plugin
1 parent a22f39b commit d8a0e36

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

material/plugins/social/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def on_config(self, config):
8787
return
8888

8989
# Move color options
90-
if "cards_color" in self.config:
90+
if self.config.cards_color:
9191

9292
# Move background color to new option
9393
value = self.config.cards_color.get("fill")
@@ -100,7 +100,7 @@ def on_config(self, config):
100100
self.config.cards_layout_options["color"] = value
101101

102102
# Move font family to new option
103-
if "cards_font" in self.config:
103+
if self.config.cards_font:
104104
value = self.config.cards_font
105105
self.config.cards_layout_options["font_family"] = value
106106

src/plugins/social/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def on_config(self, config):
8787
return
8888

8989
# Move color options
90-
if "cards_color" in self.config:
90+
if self.config.cards_color:
9191

9292
# Move background color to new option
9393
value = self.config.cards_color.get("fill")
@@ -100,7 +100,7 @@ def on_config(self, config):
100100
self.config.cards_layout_options["color"] = value
101101

102102
# Move font family to new option
103-
if "cards_font" in self.config:
103+
if self.config.cards_font:
104104
value = self.config.cards_font
105105
self.config.cards_layout_options["font_family"] = value
106106

0 commit comments

Comments
 (0)