Skip to content

Commit

Permalink
fix(defineShortcuts): handle extract when using onSelect or `onClic…
Browse files Browse the repository at this point in the history
…k` (#2896)
  • Loading branch information
Dodobibi authored Dec 14, 2024
1 parent babfcdc commit 2e17fb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/composables/defineShortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function extractShortcuts(items: any[] | any[][]) {

function traverse(items: any[]) {
items.forEach((item) => {
if (item.kbds?.length && (item.select || item.click)) {
if (item.kbds?.length && (item.onSelect || item.onClick)) {
const shortcutKey = item.kbds.join('_')
shortcuts[shortcutKey] = item.onSelect || item.onClick
}
Expand Down

0 comments on commit 2e17fb6

Please sign in to comment.