From d5dd50f87e3de5c026f60f155bb9c312bc766aee Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 3 Jan 2022 10:29:19 +0100 Subject: [PATCH] fix: check for single bluetooth listener (#32245) Co-authored-by: VerteDinde --- lib/browser/api/web-contents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index e3847224535d5..f9b85681c0fed 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -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('');