mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
fix(bug): memory block bug
This commit is contained in:
@@ -10,9 +10,11 @@ import { useWorkflowStore } from './workflow/store'
|
||||
* Reset all application stores to their initial state
|
||||
*/
|
||||
export const resetAllStores = () => {
|
||||
// Clear localStorage first
|
||||
// Selectively clear localStorage items
|
||||
if (typeof window !== 'undefined') {
|
||||
localStorage.clear()
|
||||
const keysToKeep = ['next-favicon']
|
||||
const keysToRemove = Object.keys(localStorage).filter((key) => !keysToKeep.includes(key))
|
||||
keysToRemove.forEach((key) => localStorage.removeItem(key))
|
||||
}
|
||||
|
||||
// Force immediate state reset for all stores
|
||||
|
||||
Reference in New Issue
Block a user