diff options
author | Jean Kossaifi <jean.kossaifi@gmail.com> | 2021-01-10 01:14:16 +0300 |
---|---|---|
committer | Jean Kossaifi <jean.kossaifi@gmail.com> | 2021-01-10 01:14:16 +0300 |
commit | 169c45bb35bbb50333cd5741f5a21d8fb25839d8 (patch) | |
tree | ef1a5f4eed4ba5bb94ba2dca271b5d5bd223925d /sphinx/environment | |
parent | f77461b4b7f14f93e859fb81d2a08a014997472c (diff) |
Deal with empty string case.
Diffstat (limited to 'sphinx/environment')
-rw-r--r-- | sphinx/environment/adapters/toctree.py | 2 |
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']) |