mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Add debug info for map role loading
This commit is contained in:
parent
152d7d9fad
commit
758b156db2
@ -36,7 +36,11 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
|
||||
const fetchResult = fetchMapById(mapId);
|
||||
if (!fetchResult.isLoading) {
|
||||
if (fetchResult.error) {
|
||||
throw new Error(`User coild not be loaded: ${JSON.stringify(fetchResult.error)}`);
|
||||
throw new Error(`Map info could not be loaded: ${JSON.stringify(fetchResult.error)}`);
|
||||
}
|
||||
|
||||
if (!fetchResult.map) {
|
||||
throw new Error(`Map info could not be loaded. Info not present: ${JSON.stringify(fetchResult)}`);
|
||||
}
|
||||
result = fetchResult.map.role === 'owner' ? 'edition-owner' : 'edition-editor';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user