react-chartjs-2
Advanced tools
Comparing version 2.5.1 to 2.5.2
@@ -301,4 +301,7 @@ 'use strict'; | ||
var data = this.memoizeDataProps(); | ||
options.legend = legend; | ||
if (typeof legend !== 'undefined' && !(0, _lodash2.default)(ChartComponent.defaultProps.legend, legend)) { | ||
options.legend = legend; | ||
} | ||
this.chart_instance = new _chart2.default(node, { | ||
@@ -305,0 +308,0 @@ type: type, |
{ | ||
"name": "react-chartjs-2", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"description": "react-chartjs-2", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -39,4 +39,4 @@ import React from 'react'; | ||
const mountComponent = props => mount( | ||
<Chart data={data} {...props} />, | ||
{ attachTo: DOM.body.firstChild } | ||
<Chart data={data} {...props} />, | ||
{ attachTo: DOM.body.firstChild } | ||
); | ||
@@ -126,11 +126,10 @@ | ||
const wrapper = mountComponent({ options: {} }); | ||
const defaultLegendOpts = wrapper.prop('legend'); | ||
expect(spy.callCount).to.equal(1); | ||
wrapper.setProps({ options: { legend: defaultLegendOpts } }); | ||
wrapper.setProps({ options: {} }); | ||
expect(spy.callCount).to.equal(1); | ||
wrapper.setProps({ options: { legend: defaultLegendOpts, a: 1 } }); | ||
wrapper.setProps({ options: { a: 1 } }); | ||
@@ -137,0 +136,0 @@ expect(spy.callCount).to.equal(2); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5461911
87869
3
32