diff options
| author | sostler <sbostler@gmail.com> | 2010-02-09 21:03:48 -0500 |
|---|---|---|
| committer | sostler <sbostler@gmail.com> | 2010-02-09 21:03:48 -0500 |
| commit | 8bb0ddd75b6b2160198fa362a2b8f67d7e029a0a (patch) | |
| tree | 0053f5a3720d829f9d1d7b0085411e7acbeba36d /static/js/pichat.js | |
| parent | 5ef49fe8311fae378e8dfec230ddbf0be83bf5b9 (diff) | |
Guard references to console
Diffstat (limited to 'static/js/pichat.js')
| -rwxr-xr-x | static/js/pichat.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index fb1c655..a8557c1 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -181,16 +181,15 @@ function refresh() { UnseenMsgCounter += messages.length; } } catch(e) { - if (IsAdmin) { - alert("Exception in refresh"); - console.log(e); + if (IsAdmin && window.console) { + console.error(e); } } setTimeout(refresh, 1000); }; var onError = function(resp, textStatus, errorThrown) { - if (IsAdmin) { - console.log(resp, textStatus, errorThrown); + if (IsAdmin && window.console) { + console.error(resp, textStatus, errorThrown); } setTimeout(refresh, 1000); }; @@ -237,7 +236,6 @@ function initProfile() { data: { 'attr': attr, 'val': newVal } }); if (attr == 'avatar') { - console.log(newVal); if (newVal != "") { var s = '<img id="avatarPic" src="' + newVal + '" width="150" />'; $('#avatarPic').replaceWith(s).show(); |
