diff --git a/frontend/src/ts/utils/search-service.ts b/frontend/src/ts/utils/search-service.ts index ea0cfe064ee7..14644c21dbeb 100644 --- a/frontend/src/ts/utils/search-service.ts +++ b/frontend/src/ts/utils/search-service.ts @@ -84,12 +84,12 @@ export const buildSearchService = ( rawTokens.forEach((token) => { const stemmedToken = stemmer(token); - if (!(stemmedToken in normalizedTokenToOriginal)) { + if (!Object.hasOwn(normalizedTokenToOriginal, stemmedToken)) { normalizedTokenToOriginal[stemmedToken] = new Set(); } normalizedTokenToOriginal[stemmedToken]?.add(token); - if (!(stemmedToken in reverseIndex)) { + if (!Object.hasOwn(reverseIndex, stemmedToken)) { reverseIndex[stemmedToken] = new Set(); } reverseIndex[stemmedToken]?.add(internalDocument);