Skip to content

Commit

Permalink
return after invalid subssion to prevent user going into next row
Browse files Browse the repository at this point in the history
  • Loading branch information
Jing1524 committed Jun 26, 2023
1 parent 7ace9ff commit 80d85d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ function App() {
if (!isValidWord) {
setInvalidWordError(true)
setInvalidWordRowIndex(currentRowIndex) // Store the index of the invalid word
return // prevent user going to next row after invalid error thrown
}

const newUserSolution = [...userSolution]
Expand Down

0 comments on commit 80d85d3

Please sign in to comment.