diff --git a/src/app/cache/index.ts b/src/app/cache/index.ts index 07fed8b7..9560641a 100644 --- a/src/app/cache/index.ts +++ b/src/app/cache/index.ts @@ -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 }) => {