Skip to content

fix(member-profile): hoist parsed URL variable outside try block#4259

Draft
bokelley wants to merge 1 commit intomainfrom
claude/issue-4257-member-profile-parsed-scope
Draft

fix(member-profile): hoist parsed URL variable outside try block#4259
bokelley wants to merge 1 commit intomainfrom
claude/issue-4257-member-profile-parsed-scope

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 8, 2026

Closes #4257

The member profile edit page threw ReferenceError: parsed is not defined on every page load for org members who already have a photo URL saved. The parsed variable was declared with const inside the try {} block (block-scoped, not visible outside), then referenced after the block at img.src = parsed.href. Hoisting to let parsed; before the try resolves the scope error.

Non-breaking justification: This is a single-variable scope declaration change in client-side UI JavaScript. No API, schema, or protocol surface is touched. Existing orgs without a photo URL are unaffected; orgs with a photo URL now load the page correctly instead of crashing.

Pre-PR review:

  • code-reviewer: approved — fix is mechanically correct, no uninitialized-access risk (both early-return paths in catch/protocol-check fire before parsed.href is reached), no security concerns
  • internal-tools-strategist: approved — fully addresses the reported issue, low regression risk, no other code paths affected

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_01NtURTgGU62uABeHEP9hgQ7


Generated by Claude Code

Fixes ReferenceError: parsed is not defined thrown on page load when an org has an existing photo URL. const inside try{} is block-scoped and inaccessible after the block ends; hoisting to let before the try resolves the scope error.

Closes #4257

https://claude.ai/code/session_01NtURTgGU62uABeHEP9hgQ7
@bokelley bokelley added the claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage. label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Member profile edit page throws "parsed is not defined" JS exception

2 participants