Skip to content

Commit 9bd50c3

Browse files
committed
fix a bug when parsing @Custom NatSpec tags
1 parent fc5bf14 commit 9bd50c3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.5.13
4+
5+
- Fix a bug when parsing @custom NatSpec tags.
6+
37
## 0.5.12
48

59
- Add support for @custom: NatSpec tags.

src/source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ function parseNatSpec(doc: string, context: SourceContractItem | SourceContract)
472472
const parentContract = context.contract.file.contractsInScope[content.trim()];
473473
inheritFrom = parentContract.functions.find(f => f.name === context.name);
474474
}
475-
if (tag.startsWith('custom:')) {
475+
if (tag?.startsWith('custom:')) {
476476
const key = tag.replace(/^custom:/, '');
477477
res.custom ??= {};
478478
res.custom[key] ??= '';

0 commit comments

Comments
 (0)