aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/sol-doc/src/solidity_doc_generator.ts20
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts
index 09137c4cf..424577411 100644
--- a/packages/sol-doc/src/solidity_doc_generator.ts
+++ b/packages/sol-doc/src/solidity_doc_generator.ts
@@ -90,15 +90,17 @@ export async function generateSolDocAsync(
}
}
- doc.structs = {
- comment: '',
- constructors: [],
- methods: [],
- properties: [],
- types: structs,
- functions: [],
- events: [],
- };
+ if (structs.length > 0) {
+ doc.structs = {
+ comment: '',
+ constructors: [],
+ methods: [],
+ properties: [],
+ types: structs,
+ functions: [],
+ events: [],
+ };
+ }
return doc;
}