Merge pull request '방위각 제한 (-180 ~ 180) : string 제한' (#554) from dev into prd-deploy
Reviewed-on: #554
This commit is contained in:
commit
6ec7355045
@ -819,7 +819,12 @@ export const useTrestle = () => {
|
||||
|
||||
// 발전 시뮬레이션 용 각도 재계산
|
||||
const getAzimuth = (parent) => {
|
||||
const { moduleCompass, surfaceCompass, direction } = parent
|
||||
if (typeof parent === 'string') {
|
||||
console.warn('getAzimuth: parent is string, expected object', parent);
|
||||
return 0; // 또는 적절한 기본값
|
||||
}
|
||||
|
||||
const { moduleCompass, surfaceCompass, direction } = parent || {};
|
||||
|
||||
if (surfaceCompass) {
|
||||
return -surfaceCompass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user