Skip to content

Commit

Permalink
fix: Uniq key name
Browse files Browse the repository at this point in the history
Since we can revoked and then apply again a sharing to the same user,
we can have a conflict for the key
  • Loading branch information
Crash-- committed Jan 17, 2020
1 parent dbfebef commit a5a08ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cozy-sharing/src/components/Tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export class TooltipRecipientList extends React.Component {

return (
<ul className={styles['shared-tooltip-list']}>
{recipientNames.slice(0, cutoff).map(name => (
<li key={`key_name_${name}`}>{name}</li>
{recipientNames.slice(0, cutoff).map((name, i) => (
<li key={`key_name_${name}_${i}`}>{name}</li>
))}
{recipientNames.length > cutoff && (
<li>
Expand Down

0 comments on commit a5a08ce

Please sign in to comment.