fix: check for single bluetooth listener (#32245)

Co-authored-by: VerteDinde <khammond@slack-corp.com>
This commit is contained in:
trop[bot]
2022-01-03 10:29:19 +01:00
committed by GitHub
parent 952994c591
commit d5dd50f87e

View File

@@ -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('');