Skip to content

Commit

Permalink
Fix conditional check for children in _GetRefBlockName()
Browse files Browse the repository at this point in the history
  • Loading branch information
realazthat committed Jul 16, 2024
1 parent 16cb322 commit 8da059b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mdreftidy/mdreftidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _GetRefBlockName(token: LinkReferenceDefinitionBlock) -> str:
f'\n token:\n{textwrap.indent(_DumpTokenInfo(token, ancestors=None), " ")}'
)
children: Optional[Tuple[Token, ...]] = _GetChildren(token)
if children is None:
if children is not None:
for child in children:
if not isinstance(child, LinkReferenceDefinition):
raise ValueError(
Expand Down

0 comments on commit 8da059b

Please sign in to comment.