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

can.Object.same: compare logic is incorrect when it comes to dates #773

dispatchrabbi opened this Issue Mar 11, 2014 · 0 comments


None yet
2 participants

dispatchrabbi commented Mar 11, 2014

When comparing objects with properties that have dates in them, same() is incorrect and inconsistent:

var a = {foo: null};
var b = {foo: new Date()};
var c = {foo: new Date(};

can.Object.same(a, b); // should be false; is true
can.Object.same(b, a); // should be false; is false (but not the same as same(a, b)!)
can.Object.same(b, c); // should be true, is false

Here's a demonstrative fiddle:

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