fix: 解决预览序列化遗漏替换的位置

This commit is contained in:
奔跑的面条 2023-02-08 16:38:38 +08:00
parent 68b8809a1e
commit d774a52c4f

View File

@ -44,7 +44,7 @@ export const clearLocalStorage = (name: string) => {
*/
export const setSessionStorage = <T>(k: string, v: T) => {
try {
window.sessionStorage.setItem(k, JSON.stringify(v))
window.sessionStorage.setItem(k, JSONStringify(v))
} catch (error) {
return false
}