Skip to main content
Game State Rollback
Game State Rollback
DSPACE keeps a backup of the previous game state in IndexedDB before every save. If a change corrupts
your data, you can revert to the last snapshot using rollbackGameState().
import { rollbackGameState } from '../utils/gameState/common.js';
await rollbackGameState();
The helper restores the most recently saved snapshot from IndexedDB. If no backup exists, the call has no effect.
