diff --git a/src/background/index.ts b/src/background/index.ts index 0c32453..fa539ca 100644 --- a/src/background/index.ts +++ b/src/background/index.ts @@ -42,6 +42,7 @@ const onRightClickLike = async (store, info, tab) => { const enableRightClickVote = async () => { try { + await chrome.contextMenus.removeAll(); await chrome.contextMenus.create({ id: "yup-like", title: "Like this page", @@ -50,9 +51,6 @@ const enableRightClickVote = async () => { } catch (error) { // ignore } - if(chrome.runtime.lastError) { - console.warn('Error creating context menu', chrome.runtime.lastError.message) - } } const disableRightClickVote = async () => {