Skip to content

Commit

Permalink
fix: throwing when injecting content in the hello page (#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurgeron authored Dec 10, 2024
1 parent 7e281b9 commit 8b68c21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/orange-points-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels-wallet": patch
---

Fix exception when injecting content in the hello page
3 changes: 2 additions & 1 deletion packages/app/src/systems/CRX/scripts/executeContentScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ export async function executeContentScript() {
}

function injectContentScript(tabId: number) {
const env = process.env?.NODE_ENV;
chrome.scripting
.executeScript({
target: { tabId: tabId, allFrames: true },
files: [fileName],
injectImmediately: true,
})
.catch((err) => {
if (process.env?.NODE_ENV === 'development') {
if (env === 'development') {
console.warn(err);
}
});
Expand Down

0 comments on commit 8b68c21

Please sign in to comment.