Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit 35f665b

Browse files
authored
Merge pull request #142 from miracle2k/chartjs-v2
Fix: unknown prop 'redraw' warning in React v15.2
2 parents e317447 + 381b53b commit 35f665b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/core.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var Chart = require('chart.js');
1212

1313
module.exports = {
1414
createClass: function(chartType, methodNames, dataKey) {
15+
var excludedProps = ['data', 'options', 'redraw'];
1516
var classData = {
1617
displayName: chartType + 'Chart',
1718
getInitialState: function() { return {}; },
@@ -21,7 +22,7 @@ module.exports = {
2122
};
2223
for (var name in this.props) {
2324
if (this.props.hasOwnProperty(name)) {
24-
if (name !== 'data' && name !== 'options') {
25+
if (excludedProps.indexOf(name) === -1) {
2526
_props[name] = this.props[name];
2627
}
2728
}

0 commit comments

Comments
 (0)