Created
August 22, 2018 15:25
-
-
Save bobsilverberg/54357458e26d1777175915e82188191f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/ui/components/MetadataCard/index.js b/src/ui/components/MetadataCard/index.js | |
index 6575558..1ece55e 100644 | |
--- a/src/ui/components/MetadataCard/index.js | |
+++ b/src/ui/components/MetadataCard/index.js | |
@@ -17,7 +17,7 @@ const MetadataCard = ({ className, metadata }: Props) => { | |
return ( | |
<div className={makeClassName('MetadataCard', className)}> | |
- {metadata.map(({ content, title } = {}) => { | |
+ {metadata.map(({ content, title } = {}, index) => { | |
if (content === undefined) { | |
throw new Error('content is required'); | |
} | |
@@ -29,7 +29,7 @@ const MetadataCard = ({ className, metadata }: Props) => { | |
const hasContent = content || content === '' || content === 0; | |
return ( | |
- <dl className="MetadataCard-list" key={title}> | |
+ <dl className="MetadataCard-list" key={index}> | |
<dd className="MetadataCard-content"> | |
{hasContent ? content : <LoadingText />} | |
</dd> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment