fix(canvas): clear localStoreService singleton on unmount — disposed store was returned to next mount causing currentPageId crash
Some checks failed
app-ci-deploy / test-build-deploy (push) Has been cancelled
Some checks failed
app-ci-deploy / test-build-deploy (push) Has been cancelled
This commit is contained in:
parent
38ca23dc3e
commit
a375fbe37f
@ -150,6 +150,7 @@ export default function SinglePlayerPage() {
|
|||||||
snapshotServiceRef.current = null;
|
snapshotServiceRef.current = null;
|
||||||
storeRef.current?.dispose();
|
storeRef.current?.dispose();
|
||||||
storeRef.current = null;
|
storeRef.current = null;
|
||||||
|
localStoreService.clearStore(); // reset singleton so next getStore() creates a fresh store
|
||||||
setStoreReady(false);
|
setStoreReady(false);
|
||||||
setCanvasPhase('idle');
|
setCanvasPhase('idle');
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user