Skip to content

Commit 108e916

Browse files
committed
Apply fixes from StyleCI
1 parent a73f488 commit 108e916

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

lib/summary.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@ import {
1414

1515
export const summarizeFromUrl = function (url, callback) {
1616
if (isValidUrl(url)) {
17-
axios.get(url).then((response) => {
18-
const body = response.data
17+
axios
18+
.get(url)
19+
.then(response => {
20+
const body = response.data
1921

20-
let title = getTitle(body)
21-
let text = convertHTMLToText(body)
22-
let content = onlyGetSentences(text)
22+
let title = getTitle(body)
23+
let text = convertHTMLToText(body)
24+
let content = onlyGetSentences(text)
2325

24-
return summarize(title, content, (err, result, dict) => callback(err, result, dict))
25-
})
26-
.catch((error) => {
27-
callback(
28-
true,
29-
'Failed to fetch the url. Please try again later.'
30-
)
31-
})
26+
return summarize(title, content, (err, result, dict) =>
27+
callback(err, result, dict)
28+
)
29+
})
30+
.catch(error => {
31+
callback(true, 'Failed to fetch the url. Please try again later.')
32+
})
3233
} else {
3334
callback(
3435
true,

0 commit comments

Comments
 (0)