Add check to ignore hotkey registrations with null key (#1256)

This commit is contained in:
toasted-nutbread 2021-01-16 21:52:32 -05:00 committed by GitHub
parent 5c57015a79
commit 0cbbe48694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,7 @@ class HotkeyHandler extends EventDispatcher {
for (const {action, key, modifiers, scopes, enabled} of hotkeys) { for (const {action, key, modifiers, scopes, enabled} of hotkeys) {
if ( if (
enabled && enabled &&
key !== null &&
action !== '' && action !== '' &&
scopes.includes(this._scope) scopes.includes(this._scope)
) { ) {