Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Autocomplete only for EFGJ #946

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion express/blocks/search-marquee/autocomplete-api-v3.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ const scopeEntities = [
'HzTemplate',
// 'HzTextLockup', 'Icon', 'Photo', 'DesignAsset', 'Background'
];
const wlLocales = ['en-US', 'fr-FR', 'de-DE', 'ja-JP'];
const emptyRes = { queryResults: [{ items: [] }] };
export default async function fetchAPI({ limit = 5, textQuery, locale = 'en-US' }) {
if (!textQuery) {
if (!textQuery || !wlLocales.includes(locale)) {
return [];
}

Expand Down