Skip to content

Commit

Permalink
Remove silly use of switch (...) {}
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Apr 19, 2019
1 parent c119cc2 commit 7e66101
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,12 @@ async function hyperlink(
}
)
.on('error', error => {
const code = error.code;
const message = error.message;

let actual = message || 'Unknown error';

switch (code) {
case 'ENOTFOUND':
actual = `DNS missing: ${hostname}`;
break;
if (error.code === 'ENOTFOUND') {
actual = `DNS missing: ${hostname}`;
}

reportTest({
Expand Down

0 comments on commit 7e66101

Please sign in to comment.