-
Notifications
You must be signed in to change notification settings - Fork 6
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
values() is not a function or its return value is not iterable #12
Comments
This equivalent code doesn't works too: const result = []
for(const value of mediasoupWorkers.values()) result.push(value)
return result |
Ok, according to https://medium.com/@insomniocode/javascript-iterator-and-iterable-protocols-583b700305ce, |
This fixes villadora#12 and allow to use `for..of` and array spread.
Iterating over the whole map is also not supported, but is in the native Map implementation for (const [key, val] of map) |
We would need to use an |
With the next code
being
mediasoupWorkers
an instance ofmultimap
I get the errorTypeError: mediasoupWorkers.values is not a function or its return value is not iterable
. Seems likemultimap
doesn't fully implement theiterable
and/oriterator
protocol, just only return an object with anext
method, and the coversion to an array doesn't works.The text was updated successfully, but these errors were encountered: