This commit is contained in:
hailin 2025-06-14 15:12:30 +08:00
parent 65310bc613
commit 0bce0eed07
1 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,8 @@ export async function getRuntimeEnv(key: string): Promise<string | undefined> {
// 2. 第3次开始查localStorage兜底
if (retries >= 2) {
const cached = window.localStorage.getItem(LOCAL_KEY);
const cachedIp = extractIp(cached);
const cachedIp = extractIp(cached ?? undefined);
//const cachedIp = extractIp(cached);
if (cachedIp && key === "SUPABASE_URL") {
console.warn(`[env] [${key}] 第${retries}次重试后window.RUNTIME_ENV还没拿到合法IPlocalStorage兜底: ${cached}提取IP: ${cachedIp}`);
return cachedIp;