diff --git a/src/components/map/naver/dron/DronMarker.js b/src/components/map/naver/dron/DronMarker.js index 6c5e21f..401ee27 100644 --- a/src/components/map/naver/dron/DronMarker.js +++ b/src/components/map/naver/dron/DronMarker.js @@ -116,12 +116,15 @@ export const DronMarker = props => { const markerOption = {}; if (id.substring(0, 2) === 'PA') { - const pal = controlGroupAuthInfo.find( + const pal = controlGroupAuthInfo?.find( prev => prev.idntfNum === gps.objectId ); markerOption.url = pal ? DronIcon : FlightIcon; markerOption.type = pal ? 'DRONE' : 'FLIGHT'; } else { + // const etc = controlGpList?.filter( + // prev => prev.command === 이사람이 가입한 그룹의 command(가입한 그룹의 리스트를 여기로 불러와야 함) + // ) markerOption.url = FlightIcon; markerOption.type = 'FLIGHT'; } diff --git a/src/modules/control/gp/sagas/controlGpSaga.ts b/src/modules/control/gp/sagas/controlGpSaga.ts index 759f459..04884ae 100644 --- a/src/modules/control/gp/sagas/controlGpSaga.ts +++ b/src/modules/control/gp/sagas/controlGpSaga.ts @@ -26,7 +26,7 @@ function* getControlGpSaga( let gpsData: ControlGpData[] = []; //사용자가 등록한 기체(식별장치 포함)만 관제에서 볼 수 있게 필터처리 - if (controlGroupAuthInfo.length > 0) { + if (controlGroupAuthInfo?.length > 0) { controlGroupAuthInfo.forEach(auth => { if (gpsData.length > 0) return false; @@ -46,7 +46,7 @@ function* getControlGpSaga( data.forEach(gps => { if (gps.controlId && gps.objectId.substring(0, 2) === 'PA') { - const arcrft = controlGroupAuthInfo.find( + const arcrft = controlGroupAuthInfo?.find( auth => auth.idntfNum === gps.objectId );