Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection async iteration does not work if only one element is in the collection #192

Open
welljsjs opened this issue Aug 10, 2020 · 1 comment

Comments

@welljsjs
Copy link
Contributor

Your docs state that:

If you're using a version of Node 10 or greater, you can use async iterators.

for await (let user of client.listUsers()) {
   console.log(user);
}

For more information about this API see Users: Get User.
(source: https://github.com/okta/okta-sdk-nodejs#list-all-org-users)

This does not work if there's only one element in the collection.

Fixed by #191

@shuowu
Copy link
Contributor

shuowu commented Aug 11, 2020

@welljsjs Thanks for reporting the issue. I am working on the PR, meanwhile, you can use .each method from collection as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants