From 17096919e0a60f82034e639f45206f057d7065ef Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 4 Sep 2020 22:45:55 -0400 Subject: [PATCH] PadMessageHandler: Delete redundant check This check is already made very early in `handleMessage`. --- src/node/handler/PadMessageHandler.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 69053ecaa..a1557217d 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -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(); if (!dropMessage) {