Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Commit

Permalink
chore: adjusted indentation in if..else blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
kisaiev committed Jul 21, 2023
1 parent 49f6d60 commit 9a1b3c6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9a1b3c6

Please sign in to comment.