mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-14 03:07:57 +01:00
Manage empty returns
This commit is contained in:
parent
0329798f15
commit
49bd6767ff
@ -38,7 +38,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
|
|||||||
if (fetchResult.error) {
|
if (fetchResult.error) {
|
||||||
throw new Error(`User coild not be loaded: ${JSON.stringify(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;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user