mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2025-01-31 11:53:53 +01:00
Fixed crashing of social plugin when cards are disabled
This commit is contained in:
parent
491bd0af5c
commit
c8fb426d98
@ -165,6 +165,9 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
|
|||||||
page.meta["meta"] = meta + self._generate_meta(page, config)
|
page.meta["meta"] = meta + self._generate_meta(page, config)
|
||||||
|
|
||||||
def on_post_build(self, config):
|
def on_post_build(self, config):
|
||||||
|
if not self.config.cards:
|
||||||
|
return
|
||||||
|
|
||||||
# Check for exceptions
|
# Check for exceptions
|
||||||
for promise in self._image_promises:
|
for promise in self._image_promises:
|
||||||
promise.result()
|
promise.result()
|
||||||
|
@ -165,6 +165,9 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
|
|||||||
page.meta["meta"] = meta + self._generate_meta(page, config)
|
page.meta["meta"] = meta + self._generate_meta(page, config)
|
||||||
|
|
||||||
def on_post_build(self, config):
|
def on_post_build(self, config):
|
||||||
|
if not self.config.cards:
|
||||||
|
return
|
||||||
|
|
||||||
# Check for exceptions
|
# Check for exceptions
|
||||||
for promise in self._image_promises:
|
for promise in self._image_promises:
|
||||||
promise.result()
|
promise.result()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user