Skip to content

Commit 621e14f

Browse files
committed
Fix logic around search processing
1 parent 5af8307 commit 621e14f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readthedocs/search/parse_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def process_all_json_files(version, build_dir=True):
4343
def process_headers(data, filename):
4444
"""Read headers from toc data."""
4545
headers = []
46-
if 'toc' in data:
46+
if data.get('toc', False):
4747
for element in PyQuery(data['toc'])('a'):
4848
headers.append(recurse_while_none(element))
4949
if None in headers:

0 commit comments

Comments
 (0)