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
whitecolor opened this Issue Nov 22, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@whitecolor
Contributor

whitecolor 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

This comment has been minimized.

Show comment
Hide comment
@moschel

moschel Dec 11, 2012

Contributor

yeah you were right, fixed this in b62f349

Contributor

moschel commented Dec 11, 2012

yeah you were right, fixed this in b62f349

@moschel moschel closed this Dec 11, 2012

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