mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
PadMessageHandler: Delete redundant check
This check is already made very early in `handleMessage`.
This commit is contained in:
parent
d4162341e7
commit
17096919e0
1 changed files with 0 additions and 13 deletions
|
@ -259,19 +259,6 @@ exports.handleMessage = async function(client, message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* In a previous version of this code, an "if (message)" wrapped the
|
|
||||||
* following series of async calls [now replaced with await calls]
|
|
||||||
* This ugly "!Boolean(message)" is a lame way to exactly negate the truthy
|
|
||||||
* condition and replace it with an early return, while being sure to leave
|
|
||||||
* the original behaviour unchanged.
|
|
||||||
*
|
|
||||||
* A shallower code could maybe make more evident latent logic errors.
|
|
||||||
*/
|
|
||||||
if (!Boolean(message)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let dropMessage = await handleMessageHook();
|
let dropMessage = await handleMessageHook();
|
||||||
if (!dropMessage) {
|
if (!dropMessage) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue