Skip to content

Commit 253b95f

Browse files
committed
fix bug in setPreviousGameStatus reducer
1 parent dc717a0 commit 253b95f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/src/reducers/games.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export const games = createSlice({
2222
},
2323
setPreviousGameStatus: (store) => {
2424
if (store.history.length) {
25-
store.saveGameStatus = store.history[store.history.length - 1];
26-
store.history = store.history.slice(0, store.history.length - 1);
25+
store.gameStatus = store.history[store.history.length - 1]
26+
store.history = store.history.slice(1, store.history.length - 1)
2727
}
2828
},
2929
setError: (store, action) => {

0 commit comments

Comments
 (0)