WFCD / warframe-items

📘 Get all Warframe items directly from Warframe's API. No more messy wikia scraping.
MIT License
277 stars 53 forks source link

'map' does not work as expected on items array #566

Closed Sainan closed 6 months ago

Sainan commented 6 months ago

Using 'map' on the items array causes every item to be present in the result, an easy way to see this is by querying 'length':

const items = new Items({ category: ['Arch-Gun'] });
console.log(items.length);
console.log(items.map((x) => x).length);

I've attempted to fix this in #561 by reimplementing the function as was previously done with 'filter', however this fix was seemingly rejected.

Another possible fix would be to not store properties on a class extending Array.

TobiTenno commented 6 months ago

closed by #567