mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-25 04:43:48 +01:00
Manage empty returns
This commit is contained in:
parent
8816a5e58d
commit
e9d5fee022
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user