Skip to content

Commit

Permalink
handled case where sourcemap is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
paradite committed Mar 10, 2016
1 parent e59220a commit 00db9e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ module.exports = Server;
*/

var clientSource = read(require.resolve('socket.io-client/socket.io.js'), 'utf-8');
var clientSourceMap = read(require.resolve('socket.io-client/socket.io.js.map'), 'utf-8');
var clientSourceMap = '';
try {
clientSourceMap = read(require.resolve('socket.io-client/socket.io.js.map'), 'utf-8');
} catch(err) {
debug('could not load sourcemap file');
}


/**
* Server constructor.
Expand Down

0 comments on commit 00db9e5

Please sign in to comment.