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

Calling concat() on freezed array without parameter will add undefined item to the end of array #15

Open
psulek opened this issue Apr 13, 2023 · 1 comment

Comments

@psulek
Copy link

psulek commented Apr 13, 2023

Lets have this code:

const { freeze } = require("freeze-mutate");
const obj = freeze({a: [1,2]};
const newArr = obj.a.concat();

Now newArr will have 3 items: 1, 2 and undefined which is wrong and undefined should not be added.
Also calling contact on array without any parameter is valid in JS and does not add undefined.

I can make PR if u want? @eram

@eram
Copy link
Owner

eram commented Nov 20, 2023

@psulek sure. go ahead

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