send none with en language

This commit is contained in:
zeppi 2020-11-13 18:17:09 -05:00 committed by Sean Yesmunt
parent 69a5750fc5
commit ef06c75e8f

View file

@ -127,17 +127,17 @@ function ClaimListDiscover(props: Props) {
const freshnessParam = freshness || urlParams.get(CS.FRESH_KEY) || defaultFreshness; const freshnessParam = freshness || urlParams.get(CS.FRESH_KEY) || defaultFreshness;
const langParam = urlParams.get(CS.LANGUAGE_KEY) || null; const langParam = urlParams.get(CS.LANGUAGE_KEY) || null;
const languageParam = searchInLanguage const languageParams = searchInLanguage
? langParam === null ? langParam === null
? languageSetting ? languageSetting.concat(languageSetting === 'en' ? ',none' : '')
: langParam === 'any' : langParam === 'any'
? null ? null
: langParam : langParam.concat(langParam === 'en' ? ',none' : '')
: langParam === null : langParam === null
? null ? null
: langParam === 'any' : langParam === 'any'
? null ? null
: langParam; : langParam.concat(langParam === 'en' ? ',none' : '');
const contentTypeParam = urlParams.get(CS.CONTENT_KEY); const contentTypeParam = urlParams.get(CS.CONTENT_KEY);
const claimTypeParam = const claimTypeParam =
@ -299,9 +299,9 @@ function ClaimListDiscover(props: Props) {
} }
} }
if (languageParam) { if (languageParams) {
if (languageParam !== CS.LANGUAGES_ALL) { if (languageParams !== CS.LANGUAGES_ALL) {
options.any_languages = [languageParam]; options.any_languages = languageParams.split(',');
} }
} }