From ab7744e6fd99135a0da03ae64d807573be3e13db Mon Sep 17 00:00:00 2001 From: Raphael Pinto Date: Sun, 3 Sep 2023 13:13:05 -0300 Subject: [PATCH] fix: edit template without meta --- src/pages/Menu/EditTemplate/EditTemplate.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Menu/EditTemplate/EditTemplate.tsx b/src/pages/Menu/EditTemplate/EditTemplate.tsx index f9fc1af..9fa62a7 100644 --- a/src/pages/Menu/EditTemplate/EditTemplate.tsx +++ b/src/pages/Menu/EditTemplate/EditTemplate.tsx @@ -157,7 +157,7 @@ export const EditTemplateMenu = () => { .filter(item => !item.parentId) .sort((a, b) => a.order - b.order) || []; const { name } = menu; - const meta = menu.meta.map((meta: GraphQLData) => { + const meta = (menu.meta || []).map((meta: GraphQLData) => { const { __typename, ...rest } = meta; return rest; });