Skip to content

Commit

Permalink
fix: check for single bluetooth listener (#32245)
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 Jan 3, 2022
1 parent 952994c commit d5dd50f
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 d5dd50f

Please sign in to comment.