From 9fb011bd2ae17f05c1a2d96411bf181e89a777e3 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 6 Apr 2008 13:32:15 +0000 Subject: [PATCH] Fix the case where a toctree doesn't contain anything. --- sphinx/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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."""