fix(app): collapse nested if in useImpersonationStore

WS-3 session 1b-iii follow-up — sonarjs/no-collapsible-if.

useImpersonationStore.ts:103: collapsed nested 'if (state.value)'
into the parent 'else if (data.data.session)' clause. Both legs
are AND-conditions on the same path, so the merge is semantically
identical. Brings the apps/app lint baseline to 0 problems.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-29 23:05:29 +02:00
parent 5512e22f2b
commit e4c99e23e9

View File

@@ -100,14 +100,12 @@ export const useImpersonationStore = defineStore('impersonation', () => {
clearState()
window.location.href = '/platform'
}
else if (data.data.session) {
else if (data.data.session && state.value) {
// Update expiry from server
if (state.value) {
state.value.expiresAt = data.data.session.expires_at
persistState()
}
}
}
catch {
// If status check fails, don't clear — might be a network issue
}