Skip to content

Commit

Permalink
fix: Error executing a JavaScript block when the Execution Context is…
Browse files Browse the repository at this point in the history
… "Background" (AutomaApp#1155)(AutomaApp#1134)
  • Loading branch information
Kholid060 committed Feb 14, 2023
1 parent 8e9acf9 commit cf19d28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/content/services/webService.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ window.addEventListener('user-logout', () => {
});

window.addEventListener('app-mounted', async () => {
console.log('haha');
try {
const STORAGE_KEY = 'supabase.auth.token';
const session = parseJSON(localStorage.getItem(STORAGE_KEY), null);
Expand Down
4 changes: 2 additions & 2 deletions src/workflowEngine/blocksHandler/handlerJavascriptCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ export async function javascriptCode({ outputs, data, ...block }, { refData }) {
}

const inSandbox =
(this.engine.isMV2 || this.engine.isPopup) &&
BROWSER_TYPE !== 'firefox' &&
data.context === 'background' &&
(this.engine.isMV2 || this.engine.isPopup);
data.context === 'background';
const result = await (inSandbox
? messageSandbox('javascriptBlock', {
instanceId,
Expand Down

0 comments on commit cf19d28

Please sign in to comment.