Skip to content

fix(utils): the event key may be undefined#1068

Open
btea wants to merge 1 commit intonpmx-dev:mainfrom
btea:fix/event-key-maybe-undefined
Open

fix(utils): the event key may be undefined#1068
btea wants to merge 1 commit intonpmx-dev:mainfrom
btea:fix/event-key-maybe-undefined

Conversation

@btea
Copy link
Contributor

@btea btea commented Feb 6, 2026

npmx

@vercel
Copy link

vercel bot commented Feb 6, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 6, 2026 3:53am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 6, 2026 3:53am
npmx-lunaria Ignored Ignored Feb 6, 2026 3:53am

Request Review

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/utils/input.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This change modifies the isKeyWithoutModifiers function in app/utils/input.ts by adding optional chaining to the event.key property access. The modification changes event.key.toLowerCase() to event.key?.toLowerCase(), which handles the case where event.key might be undefined. All other keyboard modifier checks remain unchanged. The function signature and public API remain intact.

🚥 Pre-merge checks | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description contains only an image reference with no textual explanation of the changes, making it impossible to assess its relevance to the code modifications. The author should provide a clear textual description explaining the fix for the undefined event key issue, rather than relying solely on an image reference.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

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