From 2b29a62616d5c3a2a6e994cd7e12a6b46cced3a8 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 6 Jan 2026 14:39:18 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=A9=EC=9C=84=EA=B0=81=20=EC=A0=9C?= =?UTF-8?q?=ED=95=9C=20(-180=20~=20180)=20:=20string=20=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 0f8c04d3..9e4415bd 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -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