Skip to content

Commit

Permalink
2nd step: Solved coordinates-log display issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrcel97 committed Aug 23, 2018
1 parent c727c51 commit ef7d3ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class Game extends React.Component {
});

const coordinates = this.history.map((step, pos) => {
if (!step.coordinates[step.lastPush]) {return null;}
const desc = pos ? 'X: ' + step.coordinates[step.lastPush] + ' Y: ' + step.coordinates[step.lastPush] : null;
if (!step.coordinates[step.lastPush]) { return null; }
const desc = pos ? 'X: ' + step.coordinates[step.lastPush][0] + ' Y: ' + step.coordinates[step.lastPush][1] : null;
return (
<li key={pos}>
<span>{desc}</span>
Expand Down

0 comments on commit ef7d3ac

Please sign in to comment.