-
Notifications
You must be signed in to change notification settings - Fork 491
Collection isn't iterable #679
Copy link
Copy link
Open
Description
Howdy, y'all 👋,
I wanted to use a for .. of-loop on a Collection and noticed that it isn't an iterable.
The fix would be rather simple; the class needs to implement Symbol.iterator, like so:
class Collection {
*[Symbol.iterator]() {
yield* this.__paths
}
}I am happy to provide a patch with tests 💯
Thanks!
Johannes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.