From ad97f736bf7a097a3471265a8789ebbb107fcdae Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 28 Mar 2016 14:30:29 -0400 Subject: [PATCH] fix device dialog --- dashboard-ui/scripts/mediacontroller.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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();