File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -257,17 +257,19 @@ export const fullText =
257
257
matchToNode : ( query : Query ) => Query ;
258
258
} ) =>
259
259
< T , K extends ConditionalKeys < T , string | undefined > > ( {
260
- value,
260
+ value : raw ,
261
261
key : field ,
262
262
query,
263
263
} : BuilderArgs < T , K > ) => {
264
- if ( ! value || typeof value !== 'string' ) {
264
+ if ( ! raw || typeof raw !== 'string' ) {
265
+ return null ;
266
+ }
267
+ const value = ( raw as string ) . trim ( ) ;
268
+ if ( ! value ) {
265
269
return null ;
266
270
}
267
271
268
- const normalized = normalizeInput
269
- ? normalizeInput ( value as string )
270
- : ( value as string ) ;
272
+ const normalized = normalizeInput ? normalizeInput ( value ) : value ;
271
273
272
274
let input = separateQueryForEachWord
273
275
? cleanSplit ( normalized , ' ' )
You can’t perform that action at this time.
0 commit comments