mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Throw error when IPC channel is missing
This commit is contained in:
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user