Skip to content

Commit

Permalink
clear localstorage on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
GrandSchtroumpf committed Feb 5, 2025
1 parent d681404 commit fa33804
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/debug/DebugConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export const DebugConfig = () => {
try {
if (!configOverride) {
setConfigOverride('');
localStorage.clear();
lsService.removeItem('configOverride');
window?.location.reload();
} else {
const parsedConfig = JSON.parse(configOverride || '');
const result = v.safeParse(v.partial(AppConfigSchema), parsedConfig);
if (result.success) {
for (let i = 0; i < localStorage.length; i++) {
localStorage.removeItem(localStorage.key(i)!);
}
localStorage.clear();
lsService.setItem('configOverride', parsedConfig);
window?.location.reload();
} else {
Expand Down

0 comments on commit fa33804

Please sign in to comment.