Fixed binding

This commit is contained in:
Simon Cambier
2024-05-26 17:36:43 +02:00
parent c308155110
commit 14c1dac8c8

View File

@@ -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