build: 调整 JaCoCo 覆盖率检查配置 #6

Merged
zhangxiang merged 28 commits from feature/react19-migration into dev 2026-05-06 19:43:00 +08:00
Showing only changes of commit 5b26a355a0 - Show all commits
+5 -2
View File
@@ -9,17 +9,18 @@ export async function authLoader() {
return redirect('/login') return redirect('/login')
} }
const authState = useAuthStore.getState() let authState = useAuthStore.getState()
if (!authState.initialized) { if (!authState.initialized) {
authState.initFromStorage() authState.initFromStorage()
authState = useAuthStore.getState()
} }
if (!authState.isAuthenticated) { if (!authState.isAuthenticated) {
return redirect('/login') return redirect('/login')
} }
const permState = usePermissionStore.getState() let permState = usePermissionStore.getState()
if (!permState.loaded) { if (!permState.loaded) {
const restored = permState.initFromStorage() const restored = permState.initFromStorage()
@@ -27,10 +28,12 @@ export async function authLoader() {
try { try {
await permState.fetchUserMenus() await permState.fetchUserMenus()
} catch { } catch {
authState = useAuthStore.getState()
authState.logout() authState.logout()
return redirect('/login') return redirect('/login')
} }
} }
permState = usePermissionStore.getState()
} }
return null return null