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

Observe.List sort doesn't use custom method passed #169

Closed
wclr opened this issue Nov 22, 2012 · 1 comment
Closed

Observe.List sort doesn't use custom method passed #169

wclr opened this issue Nov 22, 2012 · 1 comment
Milestone

Comments

@wclr
Copy link
Contributor

wclr commented Nov 22, 2012

It seems that sort function doesn't use supplied custom sort method at all:

    sort: function(method, silent){

        var comparator = this.comparator,
            args = comparator ? [function(a, b){
                a = a[comparator]
                b = b[comparator]
                return a === b ? 0 : (a < b ? -1 : 1);
            }] : [],
            res = [].sort.apply(this, args);

        !silent && can.trigger(this, "reset");
    }
@moschel
Copy link
Contributor

moschel commented Dec 11, 2012

yeah you were right, fixed this in b62f349

@moschel moschel closed this as completed Dec 11, 2012
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