Skip to content

Commit

Permalink
Starting with ts 4 the error is unknown and can't be assumed to be Error
Browse files Browse the repository at this point in the history
since you could possibly throw *anything*.
  • Loading branch information
dannon committed Oct 17, 2024
1 parent 7d8b08b commit 1745f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/stores/collectionElementsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const useCollectionElementsStore = defineStore("collectionElementsStore",

return { fetchedElements, elementOffset: offset };
} catch (error) {
loadingCollectionElementsErrors.value[collectionKey] = error;
loadingCollectionElementsErrors.value[collectionKey] = error as Error; // type is `unknown` in catch block
} finally {
delete loadingCollectionElements.value[collectionKey];
}
Expand Down

0 comments on commit 1745f59

Please sign in to comment.