Commits

Georg Brandl committed 2e92866

Fix todolist crash when no todo entry is there.

  • Participants
  • Parent commits e09eadf

Comments (0)

Files changed (1)

sphinx/ext/todo.py

     # 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([])