From 11cc3382343b621f417548ee51c9da4da1660207 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Fri, 17 Dec 2021 16:55:43 -0800 Subject: [PATCH] fix: check for single bluetooth listener (#32240) --- 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 53d1123f2fd59..65df9dd33a207 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -769,7 +769,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('');