Explorar el Código

perf: storage hooks

paobai hace 3 años
padre
commit
7aa895a2b7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/utils/storage/index.ts

+ 1 - 1
src/utils/storage/index.ts

@@ -20,7 +20,7 @@ class sessionStorageProxy implements ProxyStorage {
 
   // 取
   public getItem(key: string): any {
-    return JSON.parse(this.storage.getItem(key)) || null;
+    return JSON.parse(this.storage.getItem(key));
   }
 
   // 删