Fix the key for some list items
authorCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 22:26:54 +0000 (15:26 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 22:26:54 +0000 (15:26 -0700)
We forgot to update this we grouped players that had tied scores. So
since then the key value has been undefined, resulting in a warning
from React.

empathy/empathy.jsx

index 12bedd2f3ace02801b9652ba5295445e0596ed1c..2867dab55c1873f97f79650f2774879c80ff8c11 100644 (file)
@@ -1155,8 +1155,8 @@ class Game extends React.PureComponent {
           <ul>
             {state.scores.scores.map(score => {
               return (
-                <li key={score.player}>
-                  {score.players.join("/")}: {score.score}
+                <li key={score.players[0]}>
+                  {score.players.join("/")}: {score.score} {perfect}
                 </li>
               );
             })}