Skip to content

Commit

Permalink
fix: keyboard shortcut doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
Kholid060 committed Nov 5, 2021
1 parent 80b4cb4 commit 33fbf19
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "automa",
"version": "0.2.0",
"version": "0.2.1",
"description": "An extension for automating your browser by connecting blocks",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/background/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ chrome.runtime.onInstalled.addListener((details) => {
.set({
logs: [],
workflows: [],
shortcuts: [],
shortcuts: {},
workflowState: [],
isFirstTime: true,
visitWebTriggers: [],
Expand Down
2 changes: 1 addition & 1 deletion src/content/shortcut.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function getTriggerBlock(workflow) {
sendMessage('workflow:execute', item.workflow, 'background');
});

return false;
return true;
});
} catch (error) {
console.error(error);
Expand Down
2 changes: 1 addition & 1 deletion src/newtab/pages/workflows/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async function handleWorkflowTrigger({ data }) {
let visitWebTriggerIndex = visitWebTriggers.findIndex(
(item) => item.id === workflowId
);
const keyboardShortcuts = shortcuts || {};
const keyboardShortcuts = Array.isArray(shortcuts) ? {} : shortcuts || {};
delete keyboardShortcuts[workflowId];
if (workflowAlarm) await browser.alarms.clear(workflowId);
Expand Down
1 change: 0 additions & 1 deletion src/utils/shared.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* to-do screenshot, looping, cookies, assets, tab loaded, opened tab, and close tab block? */
/* prev and next page block? */

export const tasks = {
trigger: {
Expand Down

0 comments on commit 33fbf19

Please sign in to comment.