mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 19:35:28 +00:00
Merge pull request #2659 from PR0M3TH3AN/claude/fix-logout-button-KOtjY
Fix profile modal auto-selection when user is logged out
This commit is contained in:
1 file changed
+6
-1
@@ -2334,7 +2334,12 @@ export class ProfileModalController {
|
||||
(entry) => this.normalizeHexPubkey(entry.pubkey) === normalizedActive,
|
||||
);
|
||||
}
|
||||
if (!activeEntry && savedEntries.length) {
|
||||
// Only fall back to the first saved profile when an active pubkey IS set
|
||||
// but doesn't match any saved entry (data-inconsistency edge case).
|
||||
// When normalizedActive is null the user is logged out — do NOT auto-select
|
||||
// a profile, otherwise the modal appears as if the user merely switched
|
||||
// accounts instead of logging out.
|
||||
if (!activeEntry && normalizedActive && savedEntries.length) {
|
||||
activeEntry = savedEntries[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user