Skip to content

Commit

Permalink
Suppress log
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrews54757 committed Dec 21, 2023
1 parent 7176c61 commit 09b2a82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chrome/background/BackgroundUtils.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export class BackgroundUtils {
static checkMessageError(message) {
static checkMessageError(message, suppress = false) {
if (chrome.runtime.lastError) {
console.warn(`Unable to send message '${message}'`, chrome.runtime.lastError);
if (!suppress) console.warn(`Unable to send message '${message}'`, chrome.runtime.lastError);
}
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/background/background.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ chrome.runtime.onMessage.addListener((msg, sender, sendResponse) => {
type: 'options',
time: msg.time,
}, (response) => {
BackgroundUtils.checkMessageError('options');
BackgroundUtils.checkMessageError('options', true);
});
}
});
Expand Down

0 comments on commit 09b2a82

Please sign in to comment.