Browse Source

Merge branch 'dev' of https://github.com/automaapp/automa into dev

Ahmad Kholid 3 years ago
parent
commit
293913d78b
2 changed files with 10 additions and 2 deletions
  1. 6 0
      .github/dependabot.yml
  2. 4 2
      src/composable/shortcut.js

+ 6 - 0
.github/dependabot.yml

@@ -0,0 +1,6 @@
+version: 2
+updates:
+  - package-ecosystem: "npm"
+    directory: "/"
+    schedule:
+      interval: "daily"

+ 4 - 2
src/composable/shortcut.js

@@ -103,10 +103,12 @@ export function useShortcut(shortcuts, handler) {
       ...extractedShortcuts.data[shortcutId],
     };
 
+    if (shortcutId) event.preventDefault();
+
     if (typeof params.data === 'function') {
       params.data(params);
-    } else {
-      handler?.(params);
+    } else if (handler) {
+      handler(params);
     }
   };
   const addShortcutData = ({ combo, id, readable, ...rest }) => {