Merge pull request #8495 from QuentinSoubeyran/fix-8491

fix for #8491
This commit is contained in:
Takeshi KOMIYA 2020-11-28 10:12:00 +09:00 committed by GitHub
commit 00cd12e7e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1107,7 +1107,7 @@ class StandardDomain(Domain):
def warn_missing_reference(app: "Sphinx", domain: Domain, node: pending_xref) -> bool: def warn_missing_reference(app: "Sphinx", domain: Domain, node: pending_xref) -> bool:
if domain.name != 'std' or node['reftype'] != 'ref': if (domain and domain.name != 'std') or node['reftype'] != 'ref':
return None return None
else: else:
target = node['reftarget'] target = node['reftarget']