Remove unnecessary binds
This commit is contained in:
parent
443caa2740
commit
6f336c96c5
1 changed files with 4 additions and 4 deletions
|
@ -69,22 +69,22 @@ class ChannelSection extends React.PureComponent {
|
||||||
this.setState({
|
this.setState({
|
||||||
creatingChannel: true,
|
creatingChannel: true,
|
||||||
});
|
});
|
||||||
const success = (() => {
|
const success = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
creatingChannel: false,
|
creatingChannel: false,
|
||||||
addingChannel: false,
|
addingChannel: false,
|
||||||
channel: newChannelName,
|
channel: newChannelName,
|
||||||
});
|
});
|
||||||
this.props.handleChannelChange(newChannelName);
|
this.props.handleChannelChange(newChannelName);
|
||||||
}).bind(this);
|
};
|
||||||
const failure = (err => {
|
const failure = err => {
|
||||||
this.setState({
|
this.setState({
|
||||||
creatingChannel: false,
|
creatingChannel: false,
|
||||||
});
|
});
|
||||||
this.refs.newChannelName.showError(
|
this.refs.newChannelName.showError(
|
||||||
__("Unable to create channel due to an internal error.")
|
__("Unable to create channel due to an internal error.")
|
||||||
);
|
);
|
||||||
}).bind(this);
|
};
|
||||||
this.props.createChannel(newChannelName, amount).then(success, failure);
|
this.props.createChannel(newChannelName, amount).then(success, failure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue