Skip to content

Commit

Permalink
fix: check for single bluetooth listener (#32240)
Browse files Browse the repository at this point in the history
  • Loading branch information
VerteDinde committed Dec 18, 2021
1 parent 909dbe6 commit ffbaa1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/browser/api/web-contents.ts
Expand Up @@ -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('');
Expand Down

0 comments on commit ffbaa1d

Please sign in to comment.