Skip to content

Commit

Permalink
Version 1.0.9: Fix debug failover not returning as function, making p…
Browse files Browse the repository at this point in the history
…roduction builds error. Update lib/electron to console.error if debug.electron is not a function.
  • Loading branch information
Samantha Chalker committed May 15, 2017
1 parent aad84bc commit 2b01c37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/debug.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
try {
module.exports = require('debug');
} catch(e) {
module.exports = function() { }
module.exports = function(){ return function(){} }
}
4 changes: 2 additions & 2 deletions lib/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ ipcMain.on('app-bounce-cancel', (e, id) => app.dock.cancelBounce(Number(id)));
process.on('uncaughtException', reason => {
if(reason.code === 'EADDRINUSE' && mainWindow !== null) return;

debug.electron(`Uncaught ${reason.stack}`);
(typeof debug.electron !== 'function' ? console.error : debug.electron)(`Uncaught ${reason.stack}`);
process.exit(1);
});

process.on('unhandledRejection', (reason, p) => {
debug.electron(`Uncaught [Promise] ${reason.stack}`);
(typeof debug.electron !== 'function' ? console.error : debug.electron)(`Uncaught [Promise] ${reason.stack}`);
process.exit(1);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wssip",
"version": "1.0.8",
"version": "1.0.9",
"description": "Intercepting Proxy Application to capture, modify and send custom data from one WebSocket host to another, primarily for penetration testing. Supports WebSocket RFC6455 implementations and Socket.io.",
"main": "lib/electron.js",
"bin": {
Expand Down

0 comments on commit 2b01c37

Please sign in to comment.