Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changeset/fix-member-profile-photo-preview-scope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

Fix `parsed is not defined` ReferenceError in member profile photo preview. The `parsed` variable was declared with `const` inside a `try` block but referenced outside it; hoisting to `let` before the block resolves the scope error.
3 changes: 2 additions & 1 deletion server/public/member-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -2642,8 +2642,9 @@ <h2>Tags</h2>
}

if (photoUrl) {
let parsed;
try {
const parsed = new URL(photoUrl);
parsed = new URL(photoUrl);
if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {
setPreviewMessage('Only http/https URLs allowed', 'var(--color-error-500)', '11px');
return;
Expand Down
Loading