Fix clearAllData() not working properly (#708)

This commit is contained in:
redphx
2025-06-21 16:00:46 +07:00
parent 4da2cfaf49
commit 67fdf5ea12
4 changed files with 7 additions and 6 deletions

View File

@@ -136,7 +136,8 @@ export function parseDetailsPath(path: string) {
export function clearAllData() {
// Delete localStorage items
for (let i = 0; i < localStorage.length; i++) {
for (let i = localStorage.length - 1; i >= 0; i--) {
const key = localStorage.key(i);
if (!key) {
continue;