diff --git a/package-lock.json b/package-lock.json index 8a487d9..34946fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ebinas/react-use-minesweeper", - "version": "0.2.4", + "version": "0.2.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ebinas/react-use-minesweeper", - "version": "0.2.4", + "version": "0.2.5", "license": "MIT", "dependencies": { "react": "18.2.0" diff --git a/package.json b/package.json index 0daee47..073c323 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/logics/board/boardActions.ts b/src/logics/board/boardActions.ts index 9306ea4..09931bd 100644 --- a/src/logics/board/boardActions.ts +++ b/src/logics/board/boardActions.ts @@ -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;