Skip to content

Commit

Permalink
Merge pull request #9 from ebinase/hotfix
Browse files Browse the repository at this point in the history
[Hotfix] v0.2.5 fix the issue to open all cells on click
  • Loading branch information
ebinase authored Oct 13, 2023
2 parents a4acedb + c5d38af commit 09bcd57
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ebinas/react-use-minesweeper",
"description": "A simple react hook for minesweeper",
"version": "0.2.4",
"version": "0.2.5",
"license": "MIT",
"author": "ebinas",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/logics/board/boardActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const open = (
...board,
data: board.data.map((row) => {
return row.map((cell) => {
if (cell.id !== targetCell.id) {
if (cell.id === targetCell.id) {
return { ...targetCell, state: { type: 'opened' } };
}
return cell;
Expand Down

0 comments on commit 09bcd57

Please sign in to comment.