From 9e821711154058290e1e4cac49dc6f1edd59eec6 Mon Sep 17 00:00:00 2001 From: raviteja83 Date: Wed, 27 Mar 2024 17:26:17 +0530 Subject: [PATCH] fix: convert to else if --- .../src/audio-sink-manager/AudioSinkManager.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts b/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts index 5e17f2da64..41d1965714 100644 --- a/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts +++ b/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts @@ -299,14 +299,11 @@ export class AudioSinkManager { const label = device.label.toLowerCase(); if (label.includes('speakerphone')) { speakerPhone = device; - } - if (label.includes('wired')) { + } else if (label.includes('wired')) { wired = device; - } - if (label.includes('bluetooth')) { + } else if (label.includes('bluetooth')) { bluetoothDevice = device; - } - if (label.includes('earpiece')) { + } else if (label.includes('earpiece')) { earpiece = device; } }