diff --git a/app/composables/useNpmRegistry.ts b/app/composables/useNpmRegistry.ts index b0053056cd..dc175da3d9 100644 --- a/app/composables/useNpmRegistry.ts +++ b/app/composables/useNpmRegistry.ts @@ -239,10 +239,10 @@ export function useNpmSearch( let lastSearch: NpmSearchResponse | undefined = undefined return useLazyAsyncData( - () => `search:${toValue(query)}:${JSON.stringify(toValue(options))}`, + () => `search:${toValue(query).trim().toLowerCase()}:${JSON.stringify(toValue(options))}`, async () => { - const q = toValue(query) - if (!q.trim()) { + const q = toValue(query).trim().toLowerCase() + if (!q) { return Promise.resolve(emptySearchResponse) }