Skip to content

fix: resolve undefined type for discordEventUrl in header#5

Open
ygd58 wants to merge 1 commit into
RitualChain:mainfrom
ygd58:fix/typescript-officehours-type-safety
Open

fix: resolve undefined type for discordEventUrl in header#5
ygd58 wants to merge 1 commit into
RitualChain:mainfrom
ygd58:fix/typescript-officehours-type-safety

Conversation

@ygd58

@ygd58 ygd58 commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Problem

links.officeHours.discordEventUrl is typed as string | undefined in constants.ts, but was passed directly to href which expects string. This causes a TypeScript type error and potential runtime issue if discordEventUrl is ever undefined.

Fix

  • ✅ Add nullish coalescing operator (??) to fall back to links.officeHours.href when discordEventUrl is undefined
  • Safe, minimal change with no UI impact when discordEventUrl is defined

- Add nullish coalescing fallback for officeHours.discordEventUrl
- Prevents potential runtime error when discordEventUrl is undefined
- Falls back to officeHours.href as a safe alternative
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@ygd58 is attempting to deploy a commit to the 0xBuns Team on Vercel.

A member of the Team first needs to authorize it.

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