Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Fix Bug: fix ids array might be empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
killa1218 committed Apr 23, 2018
1 parent 55476a7 commit eeff254
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docfx_yaml/monkeypatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ def transform_all(self, node):
# capture attributes data and cache it
data.setdefault('added_attribute', [])

curuid = item.get('ids', [''])[0]
item_ids = item.get('ids', [''])
curuid = item_ids[0] if len(item_ids) > 0 else ''
parent = curuid[:curuid.rfind('.')]
name = item.children[0].astext()

Expand Down

0 comments on commit eeff254

Please sign in to comment.