Cast as App.Category
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
Alessio Davoli 2023-12-12 18:35:20 +01:00
parent a1833a0955
commit 2c290f2a85

View file

@ -5,7 +5,7 @@ export async function load({ params }) {
const categories: App.Category[] = await getRouteCategories(); const categories: App.Category[] = await getRouteCategories();
const categoryId = Number(params.slug); const categoryId = Number(params.slug);
const category: App.Category = categories.find(c => c.id === categoryId); const category: App.Category = categories.find(c => c.id === categoryId) as App.Category;
if (!category) { if (!category) {
error(404); error(404);