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

Fix: unknown prop 'redraw' warning in React v15.2 #167

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var Chart = require('chart.js');

module.exports = {
createClass: function(chartType, methodNames, dataKey) {
var excludedProps = ['data', 'options', 'redraw'];
var classData = {
displayName: chartType + 'Chart',
getInitialState: function() { return {}; },
Expand All @@ -20,7 +21,7 @@ module.exports = {
};
for (var name in this.props) {
if (this.props.hasOwnProperty(name)) {
if (name !== 'data' && name !== 'options') {
if (excludedProps.indexOf(name) === -1) {
_props[name] = this.props[name];
}
}
Expand Down