diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 71ee6123..b652492b 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -3291,6 +3291,7 @@ export const useTrestle = () => { // 가대 설치 완료 전,후 모든 surface의 isComplete를 변경 const setAllModuleSurfaceIsComplete = (bool) => { + if (!canvas) return const surfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE) surfaces.forEach((surface) => { surface.isComplete = bool @@ -3299,6 +3300,7 @@ export const useTrestle = () => { // 배치면 전체에 가대 설치 여부 const isAllComplete = () => { + if (!canvas) return false const surfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE) if (surfaces.length === 0) { return false