mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
fix: check for single bluetooth listener (#32240)
This commit is contained in:
@@ -750,7 +750,7 @@ WebContents.prototype._init = function () {
|
||||
});
|
||||
|
||||
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
|
||||
event.preventDefault();
|
||||
callback('');
|
||||
|
||||
Reference in New Issue
Block a user