mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
Fix bug on errror resolution.
This commit is contained in:
parent
b3843e7f88
commit
f5600cbe6e
@ -57,8 +57,8 @@ export const fetchMapById = (id: number): MapLoadResult => {
|
||||
}
|
||||
// Seach for object...
|
||||
map = data?.find((m) => m.id == id);
|
||||
if (map === null && !errorMsg) {
|
||||
errorMsg = { msg: `Map with id ${id} could not be found. Please, reflesh the page` }
|
||||
if (!map && !errorMsg) {
|
||||
errorMsg = { msg: `Map with id ${id} could not be found. Please, reflesh the page. Map: ${JSON.stringify(data)}` }
|
||||
}
|
||||
}
|
||||
return { isLoading: isLoading, error: errorMsg, map: map };
|
||||
|
Loading…
Reference in New Issue
Block a user