-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Throwing an Error when passing empty array to helpers.ArrayElements
#920
Comments
It could take a while until we fix this due to we are working on v7 |
I looked a bit into the code. It's a rather simple fix. I'll open a PR if it's ok to merge. |
It's #921 |
I will reopen this one, so no duplicates are created... |
This should be fixed in the current version (v7.2.0). For this reason, I will close this. |
Describe the bug
When passing in an empty Array to
helpers.ArrayElements
, I'm hoping it to return an empty Array.Instead it throws this Error:
Reproduction
Simply
faker.helpers.arrayElements([]);
Additional Info
I'm using version v6.3.1 on Deno.
The text was updated successfully, but these errors were encountered: