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 langParam = urlParams.get(CS.LANGUAGE_KEY) || null;
const languageParam = searchInLanguage
const languageParams = searchInLanguage
? langParam === null
? languageSetting
? languageSetting.concat(languageSetting === 'en' ? ',none' : '')
: langParam === 'any'
? null
: langParam
: langParam.concat(langParam === 'en' ? ',none' : '')
: langParam === null
? null
: langParam === 'any'
? null
: langParam;
: langParam.concat(langParam === 'en' ? ',none' : '');
const contentTypeParam = urlParams.get(CS.CONTENT_KEY);
const claimTypeParam =
@ -299,9 +299,9 @@ function ClaimListDiscover(props: Props) {
}
}
if (languageParam) {
if (languageParam !== CS.LANGUAGES_ALL) {
options.any_languages = [languageParam];
if (languageParams) {
if (languageParams !== CS.LANGUAGES_ALL) {
options.any_languages = languageParams.split(',');
}
}