From 70b142410bb541e8c71b62f6846233ae56f19c99 Mon Sep 17 00:00:00 2001 From: Davide Colombo Date: Wed, 3 Feb 2016 17:36:14 +0100 Subject: [PATCH] FS-8805: sanity check on array --- .../src/vertoService/services/vertoService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index 729197d28d..824e5e9e91 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js @@ -326,7 +326,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora if (!videoFlag) storage.data.selectedVideo = data.videoDevices[0].id; if (!shareFlag) storage.data.selectedShare = data.shareDevices[0].id; if (!audioFlag) storage.data.selectedAudio = data.audioDevices[0].id; - if (!speakerFlag && data.speakerDevices > 0) storage.data.selectedSpeaker = data.speakerDevices[0].id; + if (!speakerFlag && data.speakerDevices.length > 0) storage.data.selectedSpeaker = data.speakerDevices[0].id; // This means that we cannot use video! if (data.videoDevices.length === 0) {