Skip to content

Commit c8fb426

Browse files
committed
Fixed crashing of social plugin when cards are disabled
1 parent 491bd0a commit c8fb426

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

material/plugins/social/plugin.py

+3
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def on_page_markdown(self, markdown, page, config, files):
165165
page.meta["meta"] = meta + self._generate_meta(page, config)
166166

167167
def on_post_build(self, config):
168+
if not self.config.cards:
169+
return
170+
168171
# Check for exceptions
169172
for promise in self._image_promises:
170173
promise.result()

src/plugins/social/plugin.py

+3
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def on_page_markdown(self, markdown, page, config, files):
165165
page.meta["meta"] = meta + self._generate_meta(page, config)
166166

167167
def on_post_build(self, config):
168+
if not self.config.cards:
169+
return
170+
168171
# Check for exceptions
169172
for promise in self._image_promises:
170173
promise.result()

0 commit comments

Comments
 (0)