Skip to content

Commit

Permalink
fix: fix keynode cleanup for single char shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
gera2ld committed Mar 8, 2024
1 parent a3d2b3e commit 504c70b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function removeKeyNode(
if (shortcut) node.shortcuts.delete(shortcut);
else node.shortcuts.clear();
let i = ancestors.length - 1;
while (i > 1) {
while (i > 0) {
node = ancestors[i];
if (node.shortcuts.size || node.children.size) break;
const last = ancestors[i - 1];
Expand Down

0 comments on commit 504c70b

Please sign in to comment.