Skip to content

Commit aade85b

Browse files
author
Bryn Edwards
committed
Remove unnecessary error handlers
1 parent 4e2812b commit aade85b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ const handleError = err => console.error(err.toString());
4242
const run = (sources) => {
4343
const promises = sources.map(source =>
4444
(isURL(source) ?
45-
JSDOM.fromURL(source, options).catch(handleError) :
46-
JSDOM.fromFile(source, options).catch(handleError)
45+
JSDOM.fromURL(source, options) :
46+
JSDOM.fromFile(source, options)
4747
));
4848
Promise.all(promises).then((doms) => {
4949
doms.forEach(readability);
5050
})
51-
.catch(err => console.error(err.toString()));
51+
.catch(handleError);
5252
};
5353

5454
program

0 commit comments

Comments
 (0)