Skip to content

Commit

Permalink
Use console.error in SpamTracker instead of hiding errors by default
Browse files Browse the repository at this point in the history
  • Loading branch information
j-f1 committed May 14, 2017
1 parent 7e91d89 commit 5458d84
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spamtracker/spamtracker.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ unsafeWindow.Spamtracker = (function (target, siterooms, window) {
const debug = createDebug("spamtracker");
debug.warn = createDebug("spamtracker:warn");
debug.info = createDebug("spamtracker:info");
debug.error = createDebug("spamtracker:error");

// Defaults
const defaultSounds = {
Expand Down Expand Up @@ -132,7 +131,7 @@ unsafeWindow.Spamtracker = (function (target, siterooms, window) {
sound[url] = new Audio(url);
// eslint-disable-next-line no-unused-vars
sound[url].addEventListener("error", cause => {
debug.error("Failed to load: ", url);
console.error("SpamTracker failed to load", url);
});
}
return true;
Expand Down Expand Up @@ -493,8 +492,8 @@ unsafeWindow.Spamtracker = (function (target, siterooms, window) {
userSounds[soundName] ||
defaultSounds[defaultSound];
if (!sound[soundUrl]) {
debug.warn(
"Sound " +
console.error(
"SpamTracker: Sound " +
soundUrl +
" was not ready when we needed it, coming from " +
soundName
Expand Down

0 comments on commit 5458d84

Please sign in to comment.