Remove irrelevant button errors in console

This commit is contained in:
André Wahlberg 2020-12-04 12:02:45 +01:00
parent 2ea7a8d701
commit a56c68e60f

View File

@ -6,8 +6,6 @@ import './css/Button.css';
class Button extends Component { class Button extends Component {
// Multiple onClick functions // Multiple onClick functions
onClick = () => { onClick = () => {
console.log(this.props.onClick);
if (this.props.onClick !== null if (this.props.onClick !== null
&& this.props.onClick !== undefined) { && this.props.onClick !== undefined) {
if (Array.isArray(this.props.onClick)) { if (Array.isArray(this.props.onClick)) {
@ -17,8 +15,6 @@ class Button extends Component {
} else { } else {
console.log("Error when parsing Button onClick functions."); console.log("Error when parsing Button onClick functions.");
} }
} else {
console.log("Error when parsing Button onClick functions.");
} }
} }