if instead of short-circuit and for readability
This commit is contained in:
parent
5d45d5dfac
commit
0e0128c297
1 changed files with 3 additions and 1 deletions
|
@ -110,7 +110,9 @@ module.exports = React.createClass({
|
||||||
// abort all the timers for the users that started typing again
|
// abort all the timers for the users that started typing again
|
||||||
usersThatStartedTyping.forEach((m) => {
|
usersThatStartedTyping.forEach((m) => {
|
||||||
const timer = this.state.delayedStopTypingTimers[m.userId];
|
const timer = this.state.delayedStopTypingTimers[m.userId];
|
||||||
timer && timer.abort();
|
if (timer) {
|
||||||
|
timer.abort();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// prepare new delayedStopTypingTimers object to update state with
|
// prepare new delayedStopTypingTimers object to update state with
|
||||||
let delayedStopTypingTimers = Object.assign({}, this.state.delayedStopTypingTimers);
|
let delayedStopTypingTimers = Object.assign({}, this.state.delayedStopTypingTimers);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue