add: remove all to avoid error logging

This commit is contained in:
Andrei O 2023-02-28 15:25:00 +02:00
parent def6c6d5f9
commit e4be318ca9
No known key found for this signature in database
GPG Key ID: B961E5B68389457E
1 changed files with 1 additions and 3 deletions

View File

@ -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 () => {