Skip to content

Commit

Permalink
Update termSearch.ts
Browse files Browse the repository at this point in the history
Filter out nulls rather than returning incorrect type :/
  • Loading branch information
jcuenod committed Jun 21, 2024
1 parent a087d23 commit 23df52b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/termSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const mapMatchingTextSearchResults: MapToTermSearchResponseFunction = (
const row = matchingText.find((row) =>
row.parallelId === parallelId && row.moduleId === moduleId
);
return row ? mapTextResult(row) : [];
})
return row ? mapTextResult(row) : null;
}).filter(parallelText => !!parallelText)
)
);

Expand Down

0 comments on commit 23df52b

Please sign in to comment.