diff --git a/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-control.js b/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-control.js index bc42488..b85611e 100644 --- a/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-control.js +++ b/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-control.js @@ -64,12 +64,6 @@ class GridControl extends React.Component { if (this.checkMine(row, col)) { var currentField = this.refs[this.refString(row, col)]; - currentField.setState({ - currentImage: this.state.grid[row][col], - currentObj: this.state.grid[row][col], - active: true - }); - /** * It must be cached because the GridField.state not updated until * all showAppropriateFields() method runned out!! @@ -77,6 +71,12 @@ class GridControl extends React.Component { if (this.state.updatedFieldCache.indexOf(this.refString(row, col)) < 0 && !currentField.state.active) { this.state.updatedFieldCache.push(this.refString(row, col)); + currentField.setState({ + currentImage: this.state.grid[row][col], + currentObj: this.state.grid[row][col], + active: true + }); + if (this.state.grid[row][col] === 0) { return { row: row,