Skip to content

Commit a1df023

Browse files
authored
Merge pull request #144 from YigesMx/fix_var_warning
Fixed another DeprecationWarning
2 parents 407346e + 95fb5fd commit a1df023

File tree

1 file changed

+1
-1
lines changed
  • src/mkdocs_git_revision_date_localized_plugin

1 file changed

+1
-1
lines changed

src/mkdocs_git_revision_date_localized_plugin/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def on_config(self, config: config_options.Config, **kwargs) -> Dict[str, Any]:
7878
# theme locale
7979
if "theme" in config and "language" in config.get("theme"):
8080
custom_theme = config.get("theme")
81-
theme_locale = custom_theme._vars.get("language")
81+
theme_locale = custom_theme["language"] if Version(mkdocs_version) >= Version("1.6.0") else custom_theme._vars.get("language")
8282
logging.debug(
8383
"Locale '%s' extracted from the custom theme: '%s'"
8484
% (theme_locale, custom_theme.name)

0 commit comments

Comments
 (0)