Skip to content

Commit

Permalink
Remove duplicate catch block made redundant via await.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjeffburke committed Jan 2, 2020
1 parent a2f9e1e commit 6399964
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/evaluateSnippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,7 @@ module.exports = async function(snippets, options) {
);
}

try {
await promise;
} catch (e) {
snippet.htmlErrorMessage = getErrorMessage(
global.expect,
'html',
e
);
snippet.errorMessage = getErrorMessage(global.expect, 'text', e);
}
await promise;
} else {
vm.runInThisContext(
hasBabel ? snippet.code : transpile(snippet.code)
Expand Down

0 comments on commit 6399964

Please sign in to comment.