From a5a79553a85b1337071d534497509036f9448dcc Mon Sep 17 00:00:00 2001 From: James Maa Date: Thu, 13 Jun 2024 18:12:44 -0700 Subject: Handle Unchecked runtime.lastError: Cannot create item with duplicate id yomitan_lookup (#1050) --- ext/js/background/backend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index 88912b70..57e934c5 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -1315,7 +1315,7 @@ export class Backend { id: 'yomitan_lookup', title: 'Lookup in Yomitan', contexts: ['selection'], - }); + }, () => this._checkLastError(chrome.runtime.lastError)); chrome.contextMenus.onClicked.addListener((info) => { if (info.selectionText) { this._sendMessageAllTabsIgnoreResponse({action: 'frontendScanSelectedText'}); -- cgit v1.2.3