Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Kossaifi <jean.kossaifi@gmail.com>2021-01-10 01:14:16 +0300
committerJean Kossaifi <jean.kossaifi@gmail.com>2021-01-10 01:14:16 +0300
commit169c45bb35bbb50333cd5741f5a21d8fb25839d8 (patch)
treeef1a5f4eed4ba5bb94ba2dca271b5d5bd223925d /sphinx/environment
parentf77461b4b7f14f93e859fb81d2a08a014997472c (diff)
Deal with empty string case.
Diffstat (limited to 'sphinx/environment')
-rw-r--r--sphinx/environment/adapters/toctree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/environment/adapters/toctree.py b/sphinx/environment/adapters/toctree.py
index a765e8fe9..93555d172 100644
--- a/sphinx/environment/adapters/toctree.py
+++ b/sphinx/environment/adapters/toctree.py
@@ -320,7 +320,7 @@ class TocTree:
toctrees = [] # type: List[Element]
if 'includehidden' not in kwargs:
kwargs['includehidden'] = True
- if 'maxdepth' not in kwargs:
+ if 'maxdepth' not in kwargs or not kwargs['maxdepth']:
kwargs['maxdepth'] = 0
else:
kwargs['maxdepth'] = int(kwargs['maxdepth'])