Prepare v1.0.0-rc.3 bump.

Former-commit-id: d4b08cd58a7effb9e6107fe16c11ccdea032cb00
This commit is contained in:
John-David Dalton
2012-12-15 17:34:03 -08:00
parent fd25dd83bd
commit cb9e044cb3
10 changed files with 101 additions and 80 deletions

View File

@@ -539,7 +539,7 @@
// Check if the attribute has been modified since the last change,
// and update `this.changed` accordingly. If we're inside of a `change`
// call, also add a trigger to the list.
if (current[key] !== val) {
if (!_.isEqual(current[key], val)) {
this.changed[key] = val;
if (!loud) continue;
triggers.push(key, val);
@@ -1042,7 +1042,7 @@
this.handlers = [];
_.bindAll(this, 'checkUrl');
// #1653 - Ensure that `History` can be used outside of the browser.
// Ensure that `History` can be used outside of the browser.
if (typeof window !== 'undefined') {
this.location = window.location;
this.history = window.history;
@@ -1238,7 +1238,7 @@
var href = location.href.replace(/(javascript:|#).*$/, '');
location.replace(href + '#' + fragment);
} else {
// #1649 - Some browsers require that `hash` contains a leading #.
// Some browsers require that `hash` contains a leading #.
location.hash = '#' + fragment;
}
}

View File

@@ -326,7 +326,6 @@ $(document).ready(function() {
equal(model.hasChanged('name'), true);
model.change();
equal(model.get('name'), 'Rob');
});
test("changedAttributes", 3, function() {
@@ -944,4 +943,10 @@ $(document).ready(function() {
deepEqual(changes, ['a']);
});
test("#1943 change calculations should use _.isEqual", function() {
var model = new Backbone.Model({a: {key: 'value'}});
model.set('a', {key:'value'}, {silent:true});
equal(model.changedAttributes(), false);
});
});