Skip to content

Commit

Permalink
Merge pull request elastic#3 from w33ble/mutation-fix2
Browse files Browse the repository at this point in the history
Mutation fix
  • Loading branch information
stormpython committed Jan 20, 2015
2 parents efb5858 + 7e8c9f1 commit 9ccd015
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/kibana/components/vislib/vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define(function (require) {
Vis.Super.apply(this, arguments);
this.el = $el.get ? $el.get(0) : $el;
this.ChartClass = chartTypes[config.type];
this._attr = _.defaults(config || {}, {
this._attr = _.defaults({}, config || {}, {
defaultYMin: true
});
this.eventTypes = {
Expand Down
5 changes: 2 additions & 3 deletions test/unit/specs/plugins/vis_types/vislib/_renderbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ define(function (require) {
Renderbot = Private(require('plugins/vis_types/_renderbot'));
VislibRenderbot = Private(require('plugins/vis_types/vislib/_vislib_renderbot'));
normalizeChartData = Private(require('components/agg_response/index'));

});
}

Expand Down Expand Up @@ -85,7 +84,7 @@ define(function (require) {
}
}, mockVisType)
};
var $el = 'element';
var $el = $('<div>testing</div>');
var createVisSpy;
var getParamsStub;
var renderbot;
Expand All @@ -100,7 +99,7 @@ define(function (require) {
it('should create a new Vis object when params change', function () {
// called on init
expect(createVisSpy.callCount).to.be(1);
renderbot.updateParams(_.clone(params));
renderbot.updateParams();
// not called again, same params
expect(createVisSpy.callCount).to.be(1);
renderbot.vis.params = { one: 'fishy', two: 'fishy' };
Expand Down

0 comments on commit 9ccd015

Please sign in to comment.