mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Prepare v1.0.0-rc.3 bump.
Former-commit-id: d4b08cd58a7effb9e6107fe16c11ccdea032cb00
This commit is contained in:
6
vendor/backbone/backbone.js
vendored
6
vendor/backbone/backbone.js
vendored
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
7
vendor/backbone/test/model.js
vendored
7
vendor/backbone/test/model.js
vendored
@@ -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);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user