fix: return when no uid while init cache

This commit is contained in:
Tristan Yang
2023-03-16 17:25:19 +08:00
parent 809bc26f94
commit 8cb2415519
+2
View File
@@ -53,6 +53,8 @@ const tables = [
];
const initCache = () => {
const uid = localStorage.getItem(KEY_UID) || "";
// 没有uid,就没有本地缓存
if (!uid) return;
const name = `local_db_${uid}_v_${CACHE_VERSION.split(".").join("_")}`;
window.CACHE = {};
tables.forEach(({ storeName, description }) => {