Localstorage bug fix

This commit is contained in:
2021-12-28 11:41:29 -03:00
parent 0864e26039
commit c4bce522e9
3 changed files with 4 additions and 4 deletions

View File

@@ -18,13 +18,13 @@ function main(game) {
addStartButtonFunctionality(game)
const data = localStorage.getItem('data')
const data = localStorage.getItem('tic-tac-toe-data')
if (typeof(data) === 'string') {
const checkInputsResult = Object.values(JSON.parse(data))
localStorage.removeItem('data')
localStorage.removeItem('tic-tac-toe-data')
game(checkInputsResult, true)
}