Skip to content

fix: [TA-253] Daum 우편번호 스크립트 렌더 차단 + 미가드 - #140

Merged
seorinn merged 1 commit into
developfrom
TA-253-postcode-lazyload
Jun 29, 2026
Merged

seorinn merged 1 commit into
developfrom
TA-253-postcode-lazyload

Conversation

@seorinn

@seorinn seorinn commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

변경 사항

  • public/index.html head의 postcode.v2.js 동기 <script> 제거 → 모든 페이지 첫 렌더 차단 해소
  • src/utils/loadDaumPostcode.ts 신규: 필요 시점에 1회 지연 로드(진행 중 Promise 공유, 실패 시 캐시 해제+노드 정리, onload 후 전역 미설정도 실패 처리)
  • EditPhotographerPage: handleAddressSearch를 async로 전환 → await loadDaumPostcode() 후 검색창 오픈, 실패 시 안내 alert 폴백. Window.daum을 optional로 정정

배경

우편번호 스크립트가 head 동기 로드라 사용처(EditPhotographerPage)와 무관하게 전 페이지 첫 렌더를 차단했고, CDN 실패 시 window.daum undefined로 미처리 에러가 났음.

테스트

  • loadDaumPostcode.test.ts 신규 5케이스: 이미 로드 즉시 resolve / onload+전역 설정 resolve / onload+전역 미설정 reject+노드정리 / 실패 reject+캐시해제 재주입 / 동시호출 1회 주입
  • tsc 통과, 전체 41 suites / 175 tests 통과

리뷰

Opus 코드리뷰: 머지 가능. 지적된 onload 후 전역 가드·실패 노드 정리 반영 완료.

Closes TA-253

@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
damaba Ready Ready Preview, Comment Jun 29, 2026 8:35am

@seorinn
seorinn marked this pull request as ready for review June 29, 2026 08:36
@seorinn
seorinn merged commit e9df14a into develop Jun 29, 2026
3 checks passed
@seorinn
seorinn deleted the TA-253-postcode-lazyload branch June 29, 2026 08:36

This branch was successfully deployed

1 active deployment
Preview — 3e2271ef Deployed Jun 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant