방위각 제한 (-180 ~ 180) : string 제한 #553

Merged
ysCha merged 1 commits from dev into dev-deploy 2026-01-06 14:40:02 +09:00

View File

@ -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