Fixed crashing of social plugin when cards are disabled

This commit is contained in:
squidfunk 2023-01-03 11:13:40 +01:00
parent 491bd0af5c
commit c8fb426d98
2 changed files with 6 additions and 0 deletions

View File

@ -165,6 +165,9 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
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()

View File

@ -165,6 +165,9 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
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()