From 95593be3681d6c53c3d270ebaee98766ccec4822 Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Wed, 4 Sep 2024 14:34:32 -0400 Subject: [PATCH] v4.16.1: fix unhandled keydown condition --- package.json | 2 +- src/directives/hotkey.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 67f645f..b7bf130 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@signal24/vue-foundation", "type": "module", - "version": "4.16.0", + "version": "4.16.1", "description": "Common components, directives, and helpers for Vue 3 apps", "module": "./dist/vue-foundation.es.js", "exports": { diff --git a/src/directives/hotkey.ts b/src/directives/hotkey.ts index 00ec568..dabb291 100644 --- a/src/directives/hotkey.ts +++ b/src/directives/hotkey.ts @@ -41,6 +41,7 @@ function reset(el: HTMLButtonElement, binding: DirectiveBinding) { } function handleKeydown(event: KeyboardEvent) { + if (typeof event.key !== 'string') return; const hotkey = event.key.toLowerCase(); const elements = ElementsByHotkey.get(hotkey); if (elements) {