From 23488b6b985ba987bc69ff5e2e30d0d146c95cf5 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Wed, 2 Aug 2017 23:00:39 -0700 Subject: [PATCH] Fixes goonchat on ie8 ie8 doesn't define the console unless dev tools are open --- code/modules/goonchat/browserassets/js/browserOutput.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/goonchat/browserassets/js/browserOutput.js b/code/modules/goonchat/browserassets/js/browserOutput.js index 0df1c9a44ea..59b152ab3be 100644 --- a/code/modules/goonchat/browserassets/js/browserOutput.js +++ b/code/modules/goonchat/browserassets/js/browserOutput.js @@ -133,7 +133,8 @@ function highlightTerms(el) { newWord = words[w].replace("<", "<").replace(new RegExp(opts.highlightTerms[i], 'gi'), addHighlightMarkup); break; } - console.log(newWord) + if (window.console) + console.log(newWord) } newText += newWord || words[w].replace("<", "<"); newText += w >= words.length ? '' : ' '; @@ -874,4 +875,4 @@ $(function() { } $('#userBar').show(); opts.priorChatHeight = $(window).height(); -}); \ No newline at end of file +});