Skip to content
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

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

Closed
Sainan opened this issue May 6, 2024 · 1 comment
Closed

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

Sainan opened this issue May 6, 2024 · 1 comment

Comments

@Sainan
Copy link

Sainan commented May 6, 2024

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
Copy link
Member

closed by #567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants