Skip to content

Commit

Permalink
Silence a type checker error
Browse files Browse the repository at this point in the history
  • Loading branch information
rwakulszowa committed Jul 27, 2021
1 parent fa36827 commit 2cffe82
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend-project/src/components/FetchSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ export function FetchSelect<
setRelatedItems([]);
setFetchingRelatedItems(true);

fetchRelatedItems(arrayValue)
// NOTE(rwakulszowa): `ValueType` is a bit complicated - converting it to
// an array of numbers in a type safe way may require refactoring the
// code a bit, hence a manual cast.
fetchRelatedItems(arrayValue as Array<number>)
.then(autocompleteResults => {
setRelatedItems(autocompleteResults);
})
Expand Down

0 comments on commit 2cffe82

Please sign in to comment.