From 926ab3ed55a316e408c4cf3e3e2d201370d1ea1c Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 8 Mar 2022 10:25:09 -0800 Subject: [PATCH] Fix error assignmenmt --- packages/webapp/src/redux/clientSlice.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/webapp/src/redux/clientSlice.ts b/packages/webapp/src/redux/clientSlice.ts index 40e45fb8..b15a765b 100644 --- a/packages/webapp/src/redux/clientSlice.ts +++ b/packages/webapp/src/redux/clientSlice.ts @@ -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...