From ce6b29f537d1b2d6cedc04b7599b831e54c84e6d Mon Sep 17 00:00:00 2001 From: VerteDinde Date: Fri, 17 Dec 2021 13:38:15 -0800 Subject: [PATCH] fix: check for single bluetooth listener --- 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 a0211b7d4ea20..a0f9bd04e8027 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -682,7 +682,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('');