Skip to content

Commit

Permalink
fix: check show more before setting the state (#293)
Browse files Browse the repository at this point in the history
by doing this we will prevent an endless loop
  • Loading branch information
bjarneo committed Apr 22, 2024
1 parent 7433101 commit c401e4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/routes/account/users.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const Users = () => {
initialValues: users,
});

if (users?.length < SKIP) {
if (showMore && users?.length < SKIP) {
setShowMore(false);
}

Expand Down

0 comments on commit c401e4d

Please sign in to comment.