chore: fix typescript with optional return from api call

This commit is contained in:
Lei Nelissen
2024-07-21 22:30:06 +02:00
parent 68c8808188
commit e0177fb89b
5 changed files with 13 additions and 11 deletions

View File

@@ -77,5 +77,5 @@ const trackParams = {
*/
export async function retrieveAllTracks() {
return fetchApi<{ Items: AlbumTrack[] }>(({ user_id }) => `/Users/${user_id}/Items?${trackParams}`)
.then((d) => d.Items);
.then((d) => d!.Items);
}