Throw error when IPC channel is missing
This commit is contained in:
parent
cead84d5d1
commit
c94f1fc857
2 changed files with 7 additions and 0 deletions
|
@ -78,6 +78,9 @@ let wrapWebContents = function(webContents) {
|
|||
webContents.send = function() {
|
||||
var args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
||||
var channel = arguments[0];
|
||||
if (channel == null) {
|
||||
throw new Error('channel must be specified');
|
||||
}
|
||||
return this._send(channel, slice.call(args));
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue