mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-07-18 01:31:47 +00:00
Fix lint warnings
This commit is contained in:
@@ -104,7 +104,7 @@ class LunrSearchIndex implements SearchIndex {
|
||||
}
|
||||
|
||||
private initMultiLingualLunrWithoutTrimmer(
|
||||
lunrInstance: any,
|
||||
lunrInstance: lunr.Builder,
|
||||
languages: string[],
|
||||
): void {
|
||||
const pipelineFunctions: PipelineFunction[] = [];
|
||||
@@ -142,13 +142,16 @@ class LunrSearchIndex implements SearchIndex {
|
||||
.filter((s) => !!s)
|
||||
.map((s) => `${s} ${s}*`)
|
||||
.join(' ');
|
||||
const results = this.index!.search(query);
|
||||
const results = this.index.search(query);
|
||||
return results
|
||||
.sort(compare)
|
||||
.slice(0, MAX_RESULTS)
|
||||
.map((result) => ({
|
||||
id: result.ref,
|
||||
indi: this.indiMap.get(result.ref)!,
|
||||
indi: this.indiMap.get(result.ref) || {
|
||||
id: result.ref,
|
||||
firstName: 'INDI NOT FOUND',
|
||||
},
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user