Fixed binding
This commit is contained in:
@@ -422,7 +422,7 @@ export class SearchEngine {
|
|||||||
|
|
||||||
private getOptions(): Options<IndexedDocument> {
|
private getOptions(): Options<IndexedDocument> {
|
||||||
return {
|
return {
|
||||||
tokenize: this.tokenizer.tokenizeForIndexing,
|
tokenize: this.tokenizer.tokenizeForIndexing.bind(this.tokenizer),
|
||||||
extractField: (doc, fieldName) => {
|
extractField: (doc, fieldName) => {
|
||||||
if (fieldName === 'directory') {
|
if (fieldName === 'directory') {
|
||||||
// return path without the filename
|
// return path without the filename
|
||||||
|
|||||||
Reference in New Issue
Block a user