Skip to content

Commit

Permalink
fix(replay): Guard against missing key (#8246)
Browse files Browse the repository at this point in the history
`key` _should_ always be there, but let's guard against this as it seems
it may be undefined.

Fixes #8237
  • Loading branch information
mydea committed May 30, 2023
1 parent f359ef3 commit 8df6a29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/replay/src/coreHandlers/handleKeyboardEvent.ts
Expand Up @@ -28,7 +28,7 @@ export function getKeyboardBreadcrumb(event: KeyboardEvent): Breadcrumb | null {
const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;

// never capture for input fields
if (!target || isInputElement(target as HTMLElement)) {
if (!target || isInputElement(target as HTMLElement) || !key) {
return null;
}

Expand Down

0 comments on commit 8df6a29

Please sign in to comment.