mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
fixed a bug in diff_object, wrote a test to prove it.
This commit is contained in:
parent
58a95f3ff7
commit
9c68fe0de3
3 changed files with 10 additions and 3 deletions
4
TODOS.md
4
TODOS.md
|
@ -5,9 +5,9 @@
|
|||
- change this from event based to calling a method on dashboardApp – [L68](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/dashboard/directives/grid.js#L68)
|
||||
- **src/kibana/apps/discover/controllers/discover.js**
|
||||
- Switch this to watching time.string when we implement it – [L148](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/discover/controllers/discover.js#L148)
|
||||
- On array fields, negating does not negate the combination, rather all terms – [L431](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/discover/controllers/discover.js#L431)
|
||||
- Move to utility class – [L496](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/discover/controllers/discover.js#L496)
|
||||
- On array fields, negating does not negate the combination, rather all terms – [L435](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/discover/controllers/discover.js#L435)
|
||||
- Move to utility class – [L506](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/discover/controllers/discover.js#L506)
|
||||
- Move to utility class – [L516](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/discover/controllers/discover.js#L516)
|
||||
- **src/kibana/apps/settings/sections/indices/_create.js**
|
||||
- we should probably display a message of some kind – [L111](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/settings/sections/indices/_create.js#L111)
|
||||
- **src/kibana/apps/visualize/controllers/editor.js**
|
||||
|
|
|
@ -38,7 +38,7 @@ define(function (require) {
|
|||
|
||||
// Find the keys that will be changed
|
||||
diff.changed = _.filter(sourceKeys, function (key) {
|
||||
return !angular.equals(target[key]);
|
||||
return !angular.equals(target[key], source[key]);
|
||||
});
|
||||
|
||||
// Make a list of all the keys that are changing
|
||||
|
|
|
@ -57,5 +57,12 @@ define(function (require) {
|
|||
expect(target).to.not.have.property('$private');
|
||||
});
|
||||
|
||||
it('should not list any changes for similar objects', function () {
|
||||
var target = { foo: 'bar', test: 'foo' };
|
||||
var source = { foo: 'bar', test: 'foo', $private: 'foo' };
|
||||
var results = diff(target, source);
|
||||
expect(results.changed).to.be.empty();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue