Skip to content

Commit

Permalink
Fix logic around search processing
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Oct 10, 2018
1 parent 5af8307 commit 621e14f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readthedocs/search/parse_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def process_all_json_files(version, build_dir=True):
def process_headers(data, filename):
"""Read headers from toc data."""
headers = []
if 'toc' in data:
if data.get('toc', False):
for element in PyQuery(data['toc'])('a'):
headers.append(recurse_while_none(element))
if None in headers:
Expand Down

0 comments on commit 621e14f

Please sign in to comment.