Skip to content

Commit

Permalink
Remove unnecessary null check for chrome.scripting
Browse files Browse the repository at this point in the history
This API is always present as we only support Manifest V3.
  • Loading branch information
robertknight committed Oct 2, 2024
1 parent 8ce28a8 commit e5b6f0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/background/chrome-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function getChromeAPI(chrome = globalThis.chrome) {
},

scripting: {
executeScript: chrome.scripting?.executeScript,
executeScript: chrome.scripting.executeScript,
},

storage: {
Expand Down
4 changes: 4 additions & 0 deletions tests/background/chrome-api-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ describe('chrome-api', () => {
update: sinon.stub(),
},

scripting: {
executeScript: sinon.stub(),
},

storage: {
sync: {
get: sinon.stub(),
Expand Down

0 comments on commit e5b6f0f

Please sign in to comment.