From 83e2a57826d4881298cda085804910a8a662eddf Mon Sep 17 00:00:00 2001 From: Toshimitsu Takahashi Date: Sat, 19 Nov 2022 22:43:03 +0900 Subject: [PATCH] Suppress unnecessary error output --- src/popup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/popup.js b/src/popup.js index a590b6a..6fb7eab 100644 --- a/src/popup.js +++ b/src/popup.js @@ -6,11 +6,11 @@ import { StorageRepository, SyncStorageRepository } from './lib/storage_reposito function openOptions() { if (window.chrome) { chrome.runtime.openOptionsPage(err => { - console.error(`Error: ${err}`); + if (err) console.error(`Error: ${err}`); }); } else if (window.browser) { window.browser.runtime.openOptionsPage().catch(err => { - console.error(`Error: ${err}`); + if (err) console.error(`Error: ${err}`); }); } }