mozilla / sphinx-js

Autodoc-style extraction into Sphinx for your JS project
https://pypi.python.org/pypi/sphinx-js/
MIT License
282 stars 81 forks source link

Class node without children raises NoneType Exception #131

Closed nicolaiwolko closed 4 years ago

nicolaiwolko commented 4 years ago

Hi everybody,

I encountered the following exception in my typescript project:

Exception occurred: File "[...]/venv/lib/python3.7/site-packages/sphinx_js/typedoc.py", line 292, in convert_node for child in node.get('children'): TypeError: 'NoneType' object is not iterable

Following fix worked for me:

Applying a default empty list at the node children get function: https://github.com/mozilla/sphinx-js/blob/master/sphinx_js/typedoc.py#L292

Before: for child in node.get('children'): After: for child in node.get('children', []):

erikrose commented 4 years ago

Thanks for the report!