Skip to content

Commit

Permalink
fix: check for single bluetooth listener (#32243)
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 187b009 commit 6dc9d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/browser/api/web-contents.ts
Expand Up @@ -739,7 +739,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 6dc9d06

Please sign in to comment.