Skip to content

Commit

Permalink
Cherry-pick: Not enough with checking existence of window.console. In…
Browse files Browse the repository at this point in the history
… IE (depending of version/debugger), console object doesn't define log() and error()

from https://github.com/newbamboo/web-socket-js/commit/2776dcfbf7847a5e19505432d8d63f8814e37b52
  • Loading branch information
gimite committed Dec 4, 2010
1 parent 8ec2933 commit 6493b0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web_socket.js
Expand Up @@ -8,8 +8,10 @@
if (window.WebSocket) return;

var console = window.console;
if (!console) console = {log: function(){ }, error: function(){ }};

if (!console || !console.log || !console.error) {
console = {log: function(){ }, error: function(){ }};
}

if (!swfobject.hasFlashPlayerVersion("9.0.0")) {
console.error("Flash Player is not installed.");
return;
Expand Down

0 comments on commit 6493b0c

Please sign in to comment.