Fix error assignmenmt

This commit is contained in:
Paulo Gustavo Veiga 2022-03-08 10:25:09 -08:00
parent ea01716ed6
commit 3cd55d14c7

View File

@ -49,10 +49,10 @@ export const fetchMapById = (id: number): MapLoadResult => {
// If the map can not be loaded, create an error object.
let map: MapInfo;
let errorMsg: ErrorInfo;
let errorMsg: ErrorInfo = error;
if (!isLoading) {
// Sanitize error structure ...
if (error) {
if (errorMsg) {
errorMsg = Object.keys(error).length !== 0 ? error : null;
}
// Seach for object...