Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
penpenpng committed Jun 6, 2023
1 parent c65d8c0 commit 43c6a5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ async function resetContextMenu() {

const enableContextMenu = await chrome.storage.local
.get('enableContextMenu')
.then(({ enableContextMenu }) => enableContextMenu[1]);
.then(({ enableContextMenu }) => enableContextMenu?.[1]);
if (!enableContextMenu) {
return;
}

const postMethod = await chrome.storage.local
.get('postMethod')
.then(({ postMethod }) => postMethod[1]);
.then(({ postMethod }) => postMethod?.[1]);
if (postMethod === 'nsec' || postMethod === 'externalApp') {
chrome.contextMenus.create({
id: contextMenuId,
Expand Down

0 comments on commit 43c6a5b

Please sign in to comment.