Skip to content

Commit

Permalink
feat:localStorage v3
Browse files Browse the repository at this point in the history
  • Loading branch information
shanhexi committed Oct 17, 2023
1 parent 5883fe6 commit b62b421
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chat2db-client/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ export function findObjListValue<T, K extends keyof T>(list: T[], key: K, value:

// 清理就版本不兼容的LocalStorage
export function clearOlderLocalStorage() {
if (localStorage.getItem('app-local-storage-versions') !== 'v2') {
if (localStorage.getItem('app-local-storage-versions') !== 'v3') {
localStorage.clear();
localStorage.setItem('app-local-storage-versions', 'v2');
localStorage.setItem('app-local-storage-versions', 'v3');
}
}

Expand Down

0 comments on commit b62b421

Please sign in to comment.