We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 418f598 + dfadc1a commit d4e8791Copy full SHA for d4e8791
1 file changed
src/extractors/filter.extractor.js
@@ -38,9 +38,9 @@ async function extractFilterResults(params = {}) {
38
const sortParam = normalizeParam(params.sort, FILTER_SORT);
39
40
let languageParam = params.language;
41
- if (typeof languageParam === "string") {
42
- languageParam = languageParam.trim().toUpperCase();
43
- languageParam = FILTER_LANGUAGE_MAP[languageParam] || undefined;
+ if (languageParam != null) {
+ languageParam = String(languageParam).trim().toUpperCase();
+ languageParam = FILTER_LANGUAGE_MAP[languageParam] ?? (Object.values(FILTER_LANGUAGE_MAP).includes(languageParam) ? languageParam : undefined);
44
}
45
46
let genresParam = params.genres;
0 commit comments