R64 Fix:Portal 渲染崩溃修复
这个提交包含在:
+11
-8
@@ -3,7 +3,7 @@ import { canUseWindow, isEnterpriseMessengerContainer, matchesMedia } from "./li
|
||||
|
||||
const MOBILE_APPROVAL_TASK_PATH = /^\/workflow\/tasks\/([^/]+)$/i;
|
||||
const OFFLINE_ALLOWED_PATHS = ["/mobile/approvals"];
|
||||
const RUNTIME_CACHE_NAMES = ["app-api-runtime"];
|
||||
const CLEARABLE_CACHE_PREFIXES = ["app-api-runtime", "app-static-runtime", "workbox-precache"];
|
||||
|
||||
export function registerPwaIfEnabled() {
|
||||
if (import.meta.env.DEV) {
|
||||
@@ -63,12 +63,15 @@ export async function clearPwaRuntimeCaches() {
|
||||
return;
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
RUNTIME_CACHE_NAMES.map(async (cacheName) => {
|
||||
try {
|
||||
await window.caches.delete(cacheName);
|
||||
} catch {
|
||||
}
|
||||
}),
|
||||
const cacheNames = await window.caches.keys();
|
||||
const cachesToDelete = cacheNames.filter((cacheName) =>
|
||||
CLEARABLE_CACHE_PREFIXES.some((prefix) => cacheName.startsWith(prefix)),
|
||||
);
|
||||
|
||||
await Promise.all(cachesToDelete.map(async (cacheName) => {
|
||||
try {
|
||||
await window.caches.delete(cacheName);
|
||||
} catch {
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户