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

Unique does not handle non string, number or symbol values correctly #342

Open
jordydhoker opened this issue Aug 30, 2023 · 1 comment · Fixed by radashi-org/radashi#10 · May be fixed by #343
Open

Unique does not handle non string, number or symbol values correctly #342

jordydhoker opened this issue Aug 30, 2023 · 1 comment · Fixed by radashi-org/radashi#10 · May be fixed by #343

Comments

@jordydhoker
Copy link

When calling unique with non string, number or symbol values, it doesn't handle it correctly when not using a toKey function.

This is caused by using an object as the key-value pair for the uniqueness check, as an object can only handle string, number or symbol as keys. Typescript would have caught this issue but it was bypassed using as any.
Using a Map would fix this as it can handle all values as keys.

@aleclarson
Copy link

Hi @jordydhoker, this issue has a fix available in radashi@beta today (see #10). An official release is pending. We'd love to have you participate in the discussion and/or development of the radashi-org/radashi fork. 😄

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