Siderite / LInQer

The C# Language Integrated Queries ported for Javascript for amazing performance

Home Page:https://siderite.dev/blog/linq-in-javascript-linqer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

selectMany: the argument must be iterable!

lennardv2 opened this issue · comments

Hi,

I am investigating this library for a project. When testing the selectMany function i stumbled upon the following:

Linqer.Enumerable.from([[1,2],[2,3,4]]).selectMany(x => x).toArray();
> [1, 2, 2, 3, 4]

Good

Linqer.Enumerable.from([{ a: [1,2] }, { a: [2,3,4] }]).selectMany(x => x.a).toArray();
> Error: the argument must be iterable!

I was expecting the same result here, but i throws an error. Is this as intended?

Thanks

Nope. It's a bug :) Let me fix it.

Try it now, version 1.2.3.

Thanks!