Skip to content

Commit 944abe4

Browse files
committed
Fix storage typecheck regressions
1 parent afb8ef0 commit 944abe4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/storage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ function findCompatibleRefreshTokenMatchIndex<T extends AccountLike>(
11661166
matchingAccount = account;
11671167
continue;
11681168
}
1169-
const newest = selectNewestAccount(matchingAccount, account);
1169+
const newest: T = selectNewestAccount(matchingAccount ?? undefined, account);
11701170
if (newest === account) {
11711171
matchingIndex = i;
11721172
matchingAccount = account;
@@ -1939,6 +1939,7 @@ export async function withAccountAndFlaggedStorageTransaction<T>(
19391939
return withStorageLock(async () => {
19401940
const state = {
19411941
snapshot: await loadAccountsInternal(saveAccountsUnlocked),
1942+
active: true,
19421943
};
19431944
const current = state.snapshot;
19441945
const persist = async (

0 commit comments

Comments
 (0)