diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index 4f1e66e84f..bb9a158feb 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -178,10 +178,13 @@ var destination = ''; - dlg.querySelector('.btnRemoteControl').addEventListener('click', function () { - destination = 'nowplaying.html'; - dialogHelper.close(dlg); - }); + var btnRemoteControl = dlg.querySelector('.btnRemoteControl'); + if (btnRemoteControl) { + btnRemoteControl.addEventListener('click', function () { + destination = 'nowplaying.html'; + dialogHelper.close(dlg); + }); + } dlg.querySelector('.btnDisconnect').addEventListener('click', function () { MediaController.disconnectFromPlayer();