File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1326,7 +1326,7 @@ export default class MiniSearch<T = any> {
1326
1326
*/
1327
1327
search ( query : Query , searchOptions : SearchOptions = { } ) : SearchResult [ ] {
1328
1328
const { searchOptions : globalSearchOptions } = this . _options
1329
- const options = { ...globalSearchOptions , ...searchOptions }
1329
+ const searchOptionsWithDefaults : SearchOptionsWithDefaults = { ...globalSearchOptions , ...searchOptions }
1330
1330
1331
1331
const rawResults = this . executeQuery ( query , searchOptions )
1332
1332
const results = [ ]
@@ -1347,15 +1347,14 @@ export default class MiniSearch<T = any> {
1347
1347
}
1348
1348
1349
1349
Object . assign ( result , this . _storedFields . get ( docId ) )
1350
- if ( options . filter == null || options . filter ( result ) ) {
1350
+ if ( searchOptionsWithDefaults . filter == null || searchOptionsWithDefaults . filter ( result ) ) {
1351
1351
results . push ( result )
1352
1352
}
1353
1353
}
1354
1354
1355
1355
// If it's a wildcard query, and no document boost is applied, skip sorting
1356
1356
// the results, as all results have the same score of 1
1357
- if ( query === MiniSearch . wildcard &&
1358
- options . boostDocument == null ) {
1357
+ if ( query === MiniSearch . wildcard && searchOptionsWithDefaults . boostDocument == null ) {
1359
1358
return results
1360
1359
}
1361
1360
You can’t perform that action at this time.
0 commit comments