From: Davide Colombo Date: Wed, 3 Feb 2016 16:11:25 +0000 (+0100) Subject: FS-8805: sanity check on array X-Git-Tag: v1.6.7~2^2~104^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbca264940f4d5e64b61827af01d85840df623af;p=thirdparty%2Ffreeswitch.git FS-8805: sanity check on array --- diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index 930501cc48..729197d28d 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) storage.data.selectedSpeaker = data.speakerDevices[0].id; + if (!speakerFlag && data.speakerDevices > 0) storage.data.selectedSpeaker = data.speakerDevices[0].id; // This means that we cannot use video! if (data.videoDevices.length === 0) {