Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 9a08f56

Browse files
authored
Merge pull request #7 from mkdocs-material/features
added sanity check in case theme.features is not defined
2 parents 613e76b + 2b89455 commit 9a08f56

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ def transform(project: MkDocsConfig, config: MkDocsConfig):
4949
project.copyright = config.copyright
5050

5151
# Inherit settings for theme
52-
project.theme["features"].extend(config.theme["features"])
52+
if "features" in project.theme:
53+
project.theme["features"].extend(config.theme["features"])
54+
else:
55+
project.theme["features"] = config.theme["features"]
56+
5357
if "icon" in project.theme:
5458
merge(project.theme["icon"], config.theme["icon"])
5559
else:

0 commit comments

Comments
 (0)