File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -239,15 +239,15 @@ export function useNpmSearch(
239239 let lastSearch : NpmSearchResponse | undefined = undefined
240240
241241 return useLazyAsyncData (
242- ( ) => `search:${ toValue ( query ) } :${ JSON . stringify ( toValue ( options ) ) } ` ,
242+ ( ) => `search:${ toValue ( query ) . trim ( ) . toLowerCase ( ) } :${ JSON . stringify ( toValue ( options ) ) } ` ,
243243 async ( ) => {
244- const q = toValue ( query )
245- if ( ! q . trim ( ) ) {
244+ const q = toValue ( query ) . trim ( ) . toLowerCase ( )
245+ if ( ! q ) {
246246 return Promise . resolve ( emptySearchResponse )
247247 }
248248
249249 const params = new URLSearchParams ( )
250- params . set ( 'text' , q . toLowerCase ( ) )
250+ params . set ( 'text' , q )
251251 const opts = toValue ( options )
252252 if ( opts . size ) params . set ( 'size' , String ( opts . size ) )
253253 if ( opts . from ) params . set ( 'from' , String ( opts . from ) )
You can’t perform that action at this time.
0 commit comments