okta-sdk-nodejs
okta-sdk-nodejs copied to clipboard
Collection async iteration does not work if only one element is in the collection
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
@welljsjs Thanks for reporting the issue. I am working on the PR, meanwhile, you can use .each
method from collection as a workaround.