NiL.JS icon indicating copy to clipboard operation
NiL.JS copied to clipboard

TypeError: flat is not a function

Open savissimo opened this issue 3 years ago • 2 comments

If I try to run [ 1, 2, [ 3, 4 ] ].flat(), I get JSException: TypeError: [1, 2, [3, 4]].flat is not a function.

flat is a standard function of arrays. I haven't tested extensively for other array functions, but I can confirm that find, filter and map all work.

savissimo avatar Jun 06 '22 12:06 savissimo

Probably only loosely-related: it seems that reduce and some don't work as expected. I'll try to isolate some tests.

savissimo avatar Jun 06 '22 16:06 savissimo

Probably only loosely-related: it seems that reduce and some don't work as expected. I'll try to isolate some tests.

Forget that. It seems that my other problem was caused by passing a complex object into JavaScript. I'll open a separate issue for that.

savissimo avatar Jun 07 '22 12:06 savissimo