Skip to content

Commit ef7d3ac

Browse files
committed
2nd step: Solved coordinates-log display issue.
1 parent c727c51 commit ef7d3ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class Game extends React.Component {
7171
});
7272

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

0 commit comments

Comments
 (0)