Skip to content

Commit

Permalink
make error suppression less greedy (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
halocline authored Sep 10, 2024
1 parent 919df35 commit 5f953bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions grommet-leaflet/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ const SUPPRESSED_WARNINGS = [
];

console.error = function filterWarnings(msg, ...args) {
if (
Array.isArray(msg) &&
!SUPPRESSED_WARNINGS.some(entry => msg.includes(entry))
) {
const msgString = JSON.stringify(msg);
if (!SUPPRESSED_WARNINGS.some(entry => msgString.includes(entry))) {
consoleError(msg, ...args);
}
};
Expand Down

0 comments on commit 5f953bf

Please sign in to comment.