Skip to content

Commit 0da6c22

Browse files
committed
Make index as key
1 parent cfeb3bd commit 0da6c22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

samples/photo_album/src/components/PhotosUploader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ class PhotosUploader extends Component {
7979
</form>
8080
<h2>Status</h2>
8181
</div>
82-
{this.props.uploadedPhotos.map(uploadedPhoto => {
82+
{this.props.uploadedPhotos.map((uploadedPhoto, index) => {
8383
return (
8484
<UploadedPhotoStatusContainer
85-
key={uploadedPhoto.fileName}
85+
key={index}
8686
uploadedPhoto={uploadedPhoto}
8787
/>
8888
);
@@ -99,7 +99,7 @@ class PhotosUploader extends Component {
9999
onPhotoSelected(files) {
100100
const url = `https://api.cloudinary.com/v1_1/${
101101
this.context.cloudName
102-
}/upload`;
102+
}/upload`;
103103
const title = this.titleEl.value;
104104

105105
for (let file of files) {

0 commit comments

Comments
 (0)