fix: URL 파싱 에러 방어 처리 (transformReport, ClinicProfilePage)

metadata.url 또는 row.url이 null/빈 문자열일 때
new URL() 호출이 throw하던 문제를 try/catch로 방어.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Sonnet 4.6 committed 2026-04-10 15:31:56 +09:00
1 parent 742c0f1bcc
commit 2a1a6f20fb
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -137,7 +137,7 @@ export default function ClinicProfilePage() {
CLINIC.nameEn = (row.clinic_name || '').includes('의원') ? '' : row.clinic_name || '';
// Update website
const domain = new URL(row.url).hostname;
const domain = (() => { try { return new URL(row.url || '').hostname; } catch { return row.url || ''; } })();
CLINIC.websites = [{ label: '공식 홈페이지', url: domain, primary: true }];
// Update social from socialHandles