Sort plugin swaps equal value items #1705

Closed
akagomez opened this Issue May 22, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@akagomez
Contributor

akagomez commented May 22, 2015

can.batch.start();
listB.push({ id: 'a' });
listB.push({ id: 'a' });
listB.push({ id: 'a' });
can.batch.stop();
"// BATCHED; SORTED..."
"    Sorted..." // <-- Upon creating the list
"    Sorted..." 
["type:", "length", "batchNum:", undefined]
["type:", "length", "batchNum:", 9] // <-- This event caused the sort
"    Swapped? 1, 2"
["type:", "length", "batchNum:", undefined]
["type:", "length", "batchNum:", 9] // <-- This event caused the swap
["type:", "length", "batchNum:", 9]

Since all of the values are the same, no "swap" should occur.

http://jsbin.com/poduxa/6/edit?js,console

@akagomez akagomez self-assigned this May 22, 2015

@daffl daffl added this to the 2.3.0 milestone Oct 22, 2015

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Oct 22, 2015

Contributor

Closed via #1718

Contributor

daffl commented Oct 22, 2015

Closed via #1718

@daffl daffl closed this Oct 22, 2015

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