From 08db9210d2ae4e42c467aec8e8e17b749e192e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 2 Nov 2022 10:59:59 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B4=80=EC=A0=9C=20-=20=EC=8B=9D=EB=B3=84?= =?UTF-8?q?=EC=9E=A5=EC=B9=98=20=EC=9C=A0=EB=AC=B4=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=A5=B8=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/naver/dron/DronMarker.js | 5 ++++- src/modules/control/gp/sagas/controlGpSaga.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/map/naver/dron/DronMarker.js b/src/components/map/naver/dron/DronMarker.js index 9ef8fa1..303b1e1 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 );