mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-02-07 21:48:24 +00:00
Merge pull request #1374 from PieterHeemeryck/fix/minesweeper/infiniteWhileLoop
Reset when tile.HasMine triggered infinite loop
This commit is contained in:
commit
701c9604eb
@ -234,6 +234,7 @@ export default class Minesweeper extends React.Component<IMinesweeperProps, IMin
|
||||
case GameStatus.Idle: // first click starting the game
|
||||
while(tile.hasMine){
|
||||
grid = this.initGrid(this.state.settings);
|
||||
tile = grid[coord.row][coord.col];
|
||||
}
|
||||
|
||||
this.setState({
|
||||
|
Loading…
x
Reference in New Issue
Block a user