From 8bb683d2c695f0df292f6a7965efcbf3abd72a3d Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 13 Sep 2023 11:04:52 +0700 Subject: Add lazy load on stock product --- src/lib/category/components/Category.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/category/components') diff --git a/src/lib/category/components/Category.jsx b/src/lib/category/components/Category.jsx index 884a871f..af696d42 100644 --- a/src/lib/category/components/Category.jsx +++ b/src/lib/category/components/Category.jsx @@ -10,7 +10,7 @@ const Category = () => { useEffect(() => { const loadCategories = async () => { let dataCategories = await odooApi('GET', '/api/v1/category/tree') - dataCategories = dataCategories.map((category) => { + dataCategories = dataCategories?.map((category) => { category.childs = category.childs.map((child1Category) => { return { ...child1Category, -- cgit v1.2.3