Permalink
Browse files

Futuristic fix for when gimite adds Flash detection to web-socket-js

  • Loading branch information...
1 parent ca21b52 commit db8bb18135e7467556353fa402a94cca272d8635 @rauchg rauchg committed Apr 4, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/io.js
View
6 lib/io.js
@@ -7,14 +7,16 @@
*/
this.io = {
- version: '0.1.7',
+ version: '0.1.8',
setPath: function(path){
this.path = /\/$/.test(path) ? path : path + '/';
// this is temporary until we get a fix for injecting Flash WebSocket javascript files dynamically,
// as io.js shouldn't be aware of specific transports.
- WebSocket.__swfLocation = path + 'lib/vendor/web-socket-js/WebSocketMain.swf';
+ if ('WebSocket' in window){
+ WebSocket.__swfLocation = path + 'lib/vendor/web-socket-js/WebSocketMain.swf';
+ }
}
};

0 comments on commit db8bb18

Please sign in to comment.