Skip to content

Commit a8b284b

Browse files
author
zuofenghua
committed
fix: useLocalforrage setItem error
1 parent 6b89a00 commit a8b284b

File tree

4 files changed

+242
-5895
lines changed

4 files changed

+242
-5895
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ahooks-vue",
3-
"version": "0.12.5",
3+
"version": "0.12.8",
44
"description": "ahooks-vue",
55
"types": "dist/src/index.d.ts",
66
"repository": "https://github.com/dewfall123/ahooks-vue.git",
@@ -69,8 +69,8 @@
6969
"screenfull": "^5.1.0",
7070
"ts-jest": "^25.2.1",
7171
"typescript": "^4.1.5",
72-
"vitepress-for-component": "^0.15.1",
73-
"vue": "^3.0.1",
72+
"vitepress-for-component": "^0.16.8",
73+
"vue": "^3.2.29",
7474
"whatwg-fetch": "^3.5.0"
7575
},
7676
"homepage": "https://dewfall123.github.io/ahooks-vue/",

src/useLocalforage/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function useLocalforage<T = any>(
3131
}
3232

3333
function setState() {
34-
localStorage.setItem(key, JSON.stringify(state.value));
34+
localforage.setItem(key, state.value);
3535
}
3636

3737
watch(

0 commit comments

Comments
 (0)