diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-22 21:32:14 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-22 21:32:14 +0800 |
commit | 8743c40911c98fad781de631af0348d0120fc153 (patch) | |
tree | f62413adefd190d0f27a21df23069bace94d0420 /packages/react-docs/src | |
parent | 6af0f08dfc4b161637fe51b131a1c497494355eb (diff) | |
download | dexon-sol-tools-8743c40911c98fad781de631af0348d0120fc153.tar.gz dexon-sol-tools-8743c40911c98fad781de631af0348d0120fc153.tar.zst dexon-sol-tools-8743c40911c98fad781de631af0348d0120fc153.zip |
Use isEmpty
Diffstat (limited to 'packages/react-docs/src')
-rw-r--r-- | packages/react-docs/src/components/documentation.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 67523dcc3..14fe175cf 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -248,26 +248,26 @@ export class Documentation extends React.Component<DocumentationProps, Documenta {this._renderNetworkBadgesIfExists(sectionName)} </div> {docSection.comment && <Comment comment={docSection.comment} />} - {docSection.constructors.length > 0 && + {!_.isEmpty(docSection.constructors) && this.props.docsInfo.isVisibleConstructor(sectionName) && ( <div> <h2 style={headerStyle}>Constructor</h2> {this._renderConstructors(docSection.constructors, sectionName, typeDefinitionByName)} </div> )} - {docSection.properties.length > 0 && ( + {!_.isEmpty(docSection.properties) && ( <div> <h2 style={headerStyle}>Properties</h2> <div>{propertyDefs}</div> </div> )} - {docSection.methods.length > 0 && ( + {!_.isEmpty(docSection.methods) && ( <div> <h2 style={headerStyle}>Methods</h2> <div>{methodDefs}</div> </div> )} - {docSection.functions.length > 0 && ( + {!_.isEmpty(docSection.functions) && ( <div> <h2 style={headerStyle}>Functions</h2> <div>{functionDefs}</div> |