Skip to content

Commit 8df6a29

Browse files
authored
fix(replay): Guard against missing key (#8246)
`key` _should_ always be there, but let's guard against this as it seems it may be undefined. Fixes #8237
1 parent f359ef3 commit 8df6a29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/replay/src/coreHandlers/handleKeyboardEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function getKeyboardBreadcrumb(event: KeyboardEvent): Breadcrumb | null {
2828
const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;
2929

3030
// never capture for input fields
31-
if (!target || isInputElement(target as HTMLElement)) {
31+
if (!target || isInputElement(target as HTMLElement) || !key) {
3232
return null;
3333
}
3434

0 commit comments

Comments
 (0)