You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is worth knowing that I am using Clerk Core 2.0..
The issue arises from the fact that await clerkClient.users.getUserList({ query }) does not directly return an array as expected.
Proposed Solution
To address this issue, we can simply access the data field returned by clerkClient.users.getUserList({ query }). By doing so, we ensure that we retrieve the array of users correctly.
Here's how to implement the correction: const users = query ? (await clerkClient.users.getUserList({ query })).data : [];
By making this adjustment, we ensure that the code accurately captures the array of users, resolving the issue encountered.
I would appreciate any feedback on this proposed solution and would be glad to make further adjustments as needed.
The text was updated successfully, but these errors were encountered:
would you like to make a PR to incite this change?
simply clone the docs repo, open the page, make the change, and then submit the PR :~) be sure to include "Resolves Issue 910" in the title of the PR
While exploring the documentation for Implementing basic Role Based Access Control (RBAC) with metadata, I encountered an issue that needs attention:
The issue arises from the fact that
await clerkClient.users.getUserList({ query })
does not directly return an array as expected.Proposed Solution
To address this issue, we can simply access the data field returned by
clerkClient.users.getUserList({ query })
. By doing so, we ensure that we retrieve the array of users correctly.Here's how to implement the correction:
const users = query ? (await clerkClient.users.getUserList({ query })).data : [];
By making this adjustment, we ensure that the code accurately captures the array of users, resolving the issue encountered.
I would appreciate any feedback on this proposed solution and would be glad to make further adjustments as needed.
The text was updated successfully, but these errors were encountered: