diff --git a/sphinx/environment.py b/sphinx/environment.py index 1e2b679f8..62eed3eb4 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -722,7 +722,7 @@ class BuildEnvironment: entries.append(toc) if entries: return addnodes.compact_paragraph('', '', *entries) - return None + return [] def _walk_depth(node, depth, maxdepth, titleoverrides): """Utility: Cut a TOC at a specified depth."""