From 49bd6767ff12513b5146bc1913c58a4c9b229033 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 7 Mar 2022 07:35:08 -0800 Subject: [PATCH] Manage empty returns --- packages/webapp/src/components/editor-page/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webapp/src/components/editor-page/index.tsx b/packages/webapp/src/components/editor-page/index.tsx index 5e521c86..89d9306d 100644 --- a/packages/webapp/src/components/editor-page/index.tsx +++ b/packages/webapp/src/components/editor-page/index.tsx @@ -38,7 +38,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => { if (fetchResult.error) { throw new Error(`User coild not be loaded: ${JSON.stringify(fetchResult.error)}`); } - result = fetchResult.map.role === 'owner' ? 'edition-owner' : 'edition-editor'; + result = fetchResult?.map?.role === 'owner' ? 'edition-owner' : 'edition-editor'; } } return result;