Skip to content

Commit 138cb03

Browse files
authored
Fix redirect last used available (#3124)
1 parent afe564b commit 138cb03

File tree

1 file changed

+4
-2
lines changed
  • src/frontend/src/routes/(new-styling)/authorize

1 file changed

+4
-2
lines changed

src/frontend/src/routes/(new-styling)/authorize/+page.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ import {
66
AuthenticationV2Events,
77
authenticationV2Funnel,
88
} from "$lib/utils/analytics/authenticationV2Funnel";
9+
import { nonNullish } from "@dfinity/utils";
910

1011
let firstVisit = true;
1112

1213
export const load: PageLoad = () => {
13-
const lastUsedIdentityAvailable =
14-
Object.values(get(lastUsedIdentitiesStore)).length > 0;
14+
const lastUsedIdentityAvailable = nonNullish(
15+
get(lastUsedIdentitiesStore).selected,
16+
);
1517

1618
if (firstVisit) {
1719
firstVisit = false;

0 commit comments

Comments
 (0)