We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e32fb5 commit 65e5cc7Copy full SHA for 65e5cc7
1 file changed
frontend/src/ts/utils/search-service.ts
@@ -156,10 +156,7 @@ export const buildSearchService = <T>(
156
const scoreForToken = score * idf * termFrequency;
157
158
const quote = documents[document.id] as InternalDocument;
159
- if (
160
- ids.length === 0 ||
161
- (quote !== null && quote !== undefined && ids.includes(quote.id))
162
- ) {
+ if (ids.length === 0 || ids.includes(quote?.id)) {
163
results.set(document.id, currentScore + scoreForToken);
164
}
165
});
0 commit comments