list includes syntax

This commit is contained in:
Sam 2022-06-16 22:37:36 -07:00
parent 27fef50983
commit 485888b2d9

View File

@ -214,7 +214,7 @@ class BookFinder {
return this.search(provider, this.cleanTitleForCompares(title), this.cleanAuthorForCompares(author), isbn, asin, options)
}
if (provider in ["google", "audible", "itunes"]) return books
if (["google", "audible", "itunes"].includes(provider)) return books
return books.sort((a, b) => {
return a.totalDistance - b.totalDistance