diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 814136e7b..e3e8a4a83 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -667,7 +667,7 @@ const map = { routeDataList.forEach(data => { state.routeData[data.code] = data; }); - state.map.automaticRouteButtonList.forEach(item => { + state.map.automaticRouteButtonList && state.map.automaticRouteButtonList.forEach(item => { state.routeData[item.automaticRouteCode].automaticRouteCode = item.code; }); state.routeList = routeDataList;