Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix `undefined` parent.id

dominik-zeglen3ce9ae718137
diff --git a/saleor/static/dashboard-next/categories/views/CategoryDetails/index.tsx b/saleor/static/dashboard-next/categories/views/CategoryDetails/index.tsx
index aea04b292b..4ebb596fc0 100644
--- a/saleor/static/dashboard-next/categories/views/CategoryDetails/index.tsx
+++ b/saleor/static/dashboard-next/categories/views/CategoryDetails/index.tsx
@@ -114,12 +114,14 @@ export const CategoryDetails: React.StatelessComponent<
onAddProduct={() => navigate(productAddUrl)}
onBack={() =>
navigate(
- categoryUrl(
- maybe(() =>
- encodeURIComponent(
- data.category.parent.id
- )
- )
+ maybe(
+ () =>
+ categoryUrl(
+ encodeURIComponent(
+ data.category.parent.id
+ )
+ ),
+ categoryListUrl
)
)
}