diff --git a/src/lib/assets/keymaps/chara-chorder.yml b/src/lib/assets/keymaps/chara-chorder.yml index fa618cde..a9ccbf47 100644 --- a/src/lib/assets/keymaps/chara-chorder.yml +++ b/src/lib/assets/keymaps/chara-chorder.yml @@ -1,6 +1,8 @@ name: CharaChorder description: CharaChorder specific actions actions: + 0: + id: "No Action" 528: id: "RESTART" title: Restart Device diff --git a/src/lib/components/layout/GenericLayout.svelte b/src/lib/components/layout/GenericLayout.svelte index ac2adfb4..70b9a663 100644 --- a/src/lib/components/layout/GenericLayout.svelte +++ b/src/lib/components/layout/GenericLayout.svelte @@ -127,12 +127,11 @@ const clickedGroup = groupParent.children.item(index) as SVGGElement; const nextAction = get(layout)[get(activeLayer)]?.[keyInfo.id]; const currentAction = get(deviceLayout)[get(activeLayer)]?.[keyInfo.id]; - if (!nextAction || !currentAction) return; const component = new ActionSelector({ target: document.body, props: { currentAction, - nextAction: nextAction.isApplied ? undefined : nextAction.action, + nextAction: nextAction?.isApplied ? undefined : nextAction?.action, }, }); const dialog = document.querySelector("dialog > div") as HTMLDivElement;