Skip to content

Commit

Permalink
Anothe useAccounts bugfix (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass authored Jan 19, 2024
1 parent 3275d76 commit 812022e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function useAccounts<T>(

// Sometimes eager result never gets set because cache or keys is undefined
useEffect(() => {
if (eagerResult && accounts.length == 0 && (eagerResult?.length || 0) != 0) {
if (eagerResult && accounts.length != keys?.length && (eagerResult?.length || 0) == keys?.length) {
setAccounts(eagerResult);
}
}, [accounts, eagerResult])
Expand Down

0 comments on commit 812022e

Please sign in to comment.