diff options
author | Fabio Berger <me@fabioberger.com> | 2018-09-28 01:40:38 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-09-28 01:40:38 +0800 |
commit | c0498944c38e827dc69f369dd1427df43b23c9a9 (patch) | |
tree | d8058159fe196f224367e03781ad3045677c0433 /packages/react-docs/src | |
parent | 5cc11912a70f33112983736197d20de941f18137 (diff) | |
download | dexon-sol-tools-c0498944c38e827dc69f369dd1427df43b23c9a9.tar dexon-sol-tools-c0498944c38e827dc69f369dd1427df43b23c9a9.tar.gz dexon-sol-tools-c0498944c38e827dc69f369dd1427df43b23c9a9.tar.bz2 dexon-sol-tools-c0498944c38e827dc69f369dd1427df43b23c9a9.tar.lz dexon-sol-tools-c0498944c38e827dc69f369dd1427df43b23c9a9.tar.xz dexon-sol-tools-c0498944c38e827dc69f369dd1427df43b23c9a9.tar.zst dexon-sol-tools-c0498944c38e827dc69f369dd1427df43b23c9a9.zip |
Add more robust key
Diffstat (limited to 'packages/react-docs/src')
-rw-r--r-- | packages/react-docs/src/components/documentation.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 3cd14923c..55aa1587e 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -10,6 +10,7 @@ import { utils as sharedUtils, } from '@0xproject/react-shared'; import { + CustomType, DocAgnosticFormat, Event, ExternalExportToLink, @@ -218,11 +219,11 @@ export class Documentation extends React.Component<DocumentationProps, Documenta _.isEmpty(docSection.events); const sortedTypes = _.sortBy(docSection.types, 'name'); - const typeDefs = _.map(sortedTypes, customType => { + const typeDefs = _.map(sortedTypes, (customType: CustomType, i: number) => { return ( <TypeDefinition sectionName={sectionName} - key={`type-${customType.name}`} + key={`type-${customType.name}-${i}`} customType={customType} docsInfo={this.props.docsInfo} typeDefinitionByName={typeDefinitionByName} |