v0.1.51
v0.1.51 — v0.1.50 의 "color is not defined" ReferenceError hotfix
사용자 보고
- "2D 모드 뷰포트에서 color is not defined 라는 오류가 발생중"
근본 원인
- v0.1.50 의 AgentAvatars2D.tsx 리팩토링 중
void color;문이for (const a of avatars) { ... }루프 **밖**에 있었음.const color는 블록 스코프 (loop 안) 이라 루프 밖에선 ReferenceError.
변경 파일
src/components/Avatars/AgentAvatars2D.tsx- 루프 안
const color→const hueColor로 리네임 (action 색상이 아닌 fallback hue 색이라 명확화). - mountLines.push 의
color→hueColor로 업데이트. - 루프 밖의 잘못된
void color;라인 제거.
TypeScript 가 못 잡은 이유 분석
- 같은 파일의 다른 컴포넌트 (
RestingAreaCharacterline 141,Avatar2Dline 716) 에const color가 있음. TypeScript 가 outer scope 의color를 참조한다고 잘못 추론했을 가능성. 빌드는 통과했지만 런타임에서 실제 outer 변수가 inner 함수 context 에 없어 ReferenceError.
검증
npx tsc --noEmitexit=0.npm run build성공 — out/renderer/index-B307LYhG.js 3,081.01kB.
📦 GitHub 릴리스 노트: v0.1.51