Skip to content

Commit

Permalink
fix: check for single bluetooth listener (#32244)
Browse files Browse the repository at this point in the history
Co-authored-by: VerteDinde <khammond@slack-corp.com>
  • Loading branch information
trop[bot] and VerteDinde committed Dec 20, 2021
1 parent 0d5c7e1 commit ea82750
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 ea82750

Please sign in to comment.