diff --git a/material/partials/toc.html b/material/partials/toc.html
index 2fdb565c6..e249225ac 100644
--- a/material/partials/toc.html
+++ b/material/partials/toc.html
@@ -3,7 +3,7 @@
-#}
{% import "partials/language.html" as lang with context %}
{% set title = title | default(lang.t("toc.title")) %}
-{% if "toc" in config.mdx_configs and config.mdx_configs.toc.title %}
+{% if config.mdx_configs.toc and config.mdx_configs.toc.title %}
{% set title = config.mdx_configs.toc.title %}
{% endif %}