mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix todolist crash when no todo entry is there.
This commit is contained in:
@@ -61,6 +61,9 @@ def process_todo_nodes(app, doctree, fromdocname):
|
||||
# Augment each todo with a backlink to the original location.
|
||||
env = app.builder.env
|
||||
|
||||
if not hasattr(env, 'todo_all_todos'):
|
||||
env.todo_all_todos = []
|
||||
|
||||
for node in doctree.traverse(todolist):
|
||||
if not app.config['todo_include_todos']:
|
||||
node.replace_self([])
|
||||
|
||||
Reference in New Issue
Block a user