Add more robust key
This commit is contained in:
parent
5cc11912a7
commit
c0498944c3
@ -10,6 +10,7 @@ import {
|
|||||||
utils as sharedUtils,
|
utils as sharedUtils,
|
||||||
} from '@0xproject/react-shared';
|
} from '@0xproject/react-shared';
|
||||||
import {
|
import {
|
||||||
|
CustomType,
|
||||||
DocAgnosticFormat,
|
DocAgnosticFormat,
|
||||||
Event,
|
Event,
|
||||||
ExternalExportToLink,
|
ExternalExportToLink,
|
||||||
@ -218,11 +219,11 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
|
|||||||
_.isEmpty(docSection.events);
|
_.isEmpty(docSection.events);
|
||||||
|
|
||||||
const sortedTypes = _.sortBy(docSection.types, 'name');
|
const sortedTypes = _.sortBy(docSection.types, 'name');
|
||||||
const typeDefs = _.map(sortedTypes, customType => {
|
const typeDefs = _.map(sortedTypes, (customType: CustomType, i: number) => {
|
||||||
return (
|
return (
|
||||||
<TypeDefinition
|
<TypeDefinition
|
||||||
sectionName={sectionName}
|
sectionName={sectionName}
|
||||||
key={`type-${customType.name}`}
|
key={`type-${customType.name}-${i}`}
|
||||||
customType={customType}
|
customType={customType}
|
||||||
docsInfo={this.props.docsInfo}
|
docsInfo={this.props.docsInfo}
|
||||||
typeDefinitionByName={typeDefinitionByName}
|
typeDefinitionByName={typeDefinitionByName}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user