diff --git a/lib/hooks.js b/lib/hooks.js index 43df2ef..94de058 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -114,17 +114,15 @@ async function init (options) { debug('%s(): merged hook data: %j', hookName, finalData) return finalData - } else // for the `response` hook, return the first non-falsy value - if (hookName === 'response') { + } else if (hookName === 'response') { const response = results.find((result) => result) debug('%s(): first result: %j', hookName, response) return response - } else // for the `read` hook, return the first non-falsy value - if (hookName === 'read') { + } else if (hookName === 'read') { const response = results.find((result) => result) debug('%s(): first result: %j', hookName, response)