Skip to content

Commit

Permalink
use const key for new&unsaved locations
Browse files Browse the repository at this point in the history
if the location does not have an id yet (was not stored in epi yet)
we will use a temporary key to avoid react warning
  • Loading branch information
barteksekula committed Apr 14, 2019
1 parent ee408b9 commit 8e0e085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/reviewLocationsCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class ReviewLocationsCollection extends React.Component<ReviewLoc
<div>
{filter.showPoints &&
locations.map(location =>
<ReviewLocationComponent key={location.id} location={location} showDialog={(e) => this.onLocationClick(e, location)} />
<ReviewLocationComponent key={location.id || "unsaved"} location={location} showDialog={(e) => this.onLocationClick(e, location)} />
)}
</div>)
};
Expand Down

0 comments on commit 8e0e085

Please sign in to comment.