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

Dispatch correct arguments with can.List:splice if inserting and removing the same elements. #1277

Closed
justinbmeyer opened this Issue Oct 17, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@justinbmeyer
Contributor

justinbmeyer commented Oct 17, 2014

Related to: 0b7b107

Something like this should break:

var list = new can.List(["a","b"]);
list.bind("remove", function(ev, items, index){
  equal(items.length, 2);
});
list.splice(0,2,"a","b");

Also, splice is checking every item removed against every item added. n^2 when it should be n.

cc @brianmoschel

@justinbmeyer justinbmeyer added the bug label Oct 17, 2014

BigAB added a commit that referenced this issue Oct 17, 2014

justinbmeyer added a commit that referenced this issue Oct 17, 2014

@daffl daffl added this to the 2.1.4 milestone Oct 22, 2014

@moschel

This comment has been minimized.

Show comment
Hide comment
@moschel

moschel Nov 5, 2014

Contributor

@BigAB did you fix this directly in Master? We always fix stuff like that in a branch, add a test to prove its fixed, and only merge after someone has given it a +1.

Contributor

moschel commented Nov 5, 2014

@BigAB did you fix this directly in Master? We always fix stuff like that in a branch, add a test to prove its fixed, and only merge after someone has given it a +1.

@moschel

This comment has been minimized.

Show comment
Hide comment
@moschel

moschel Nov 5, 2014

Contributor

Oh you did add a test :) But it went directly into master. Can you please close this if all tests are passing and the issue is fixed?

Contributor

moschel commented Nov 5, 2014

Oh you did add a test :) But it went directly into master. Can you please close this if all tests are passing and the issue is fixed?

@BigAB

This comment has been minimized.

Show comment
Hide comment
@BigAB

BigAB Nov 5, 2014

Contributor

I did make a branch and a pull request #1278

There is a test

Justin merged it +1 and merged it.

Yes I will close this issue.

Contributor

BigAB commented Nov 5, 2014

I did make a branch and a pull request #1278

There is a test

Justin merged it +1 and merged it.

Yes I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment