Skip to content

Commit

Permalink
Fixed crashing of social plugin when cards are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Jan 3, 2023
1 parent 491bd0a commit c8fb426
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions material/plugins/social/plugin.py
Expand Up @@ -165,6 +165,9 @@ def on_page_markdown(self, markdown, page, config, files):
page.meta["meta"] = meta + self._generate_meta(page, config)

def on_post_build(self, config):
if not self.config.cards:
return

# Check for exceptions
for promise in self._image_promises:
promise.result()
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/social/plugin.py
Expand Up @@ -165,6 +165,9 @@ def on_page_markdown(self, markdown, page, config, files):
page.meta["meta"] = meta + self._generate_meta(page, config)

def on_post_build(self, config):
if not self.config.cards:
return

# Check for exceptions
for promise in self._image_promises:
promise.result()
Expand Down

0 comments on commit c8fb426

Please sign in to comment.