Skip to content

Commit

Permalink
fix(helper): 🐛 always trim author name when scraping
Browse files Browse the repository at this point in the history
some instances (at least in unit testing) authors could have empty white space
  • Loading branch information
djdembeck committed Aug 5, 2022
1 parent 3f189c8 commit f598f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/authors/audible/ScrapeHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class ScrapeHelper {
try {
const name = $('h1.bc-text-bold')[0].children[0]
if (isText(name)) {
returnJson.name = name.data
returnJson.name = name.data.trim()
}
} catch (err) {
throw new Error('Author name not available')
Expand Down

0 comments on commit f598f2e

Please sign in to comment.