fix: check for single bluetooth listener (#32240)
This commit is contained in:
parent
909dbe6890
commit
ffbaa1d83f
1 changed files with 1 additions and 1 deletions
|
@ -750,7 +750,7 @@ WebContents.prototype._init = function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.on('select-bluetooth-device', (event, devices, callback) => {
|
this.on('select-bluetooth-device', (event, devices, callback) => {
|
||||||
if (this.listenerCount('select-bluetooth-device') === 0) {
|
if (this.listenerCount('select-bluetooth-device') === 1) {
|
||||||
// Cancel it if there are no handlers
|
// Cancel it if there are no handlers
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
callback('');
|
callback('');
|
||||||
|
|
Loading…
Reference in a new issue