From 52bda7938480d4aa6a7f85c4fd3be11c11e9f559 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 10 Jul 2016 11:38:01 -0400 Subject: #281 - tweak back button handling Former-commit-id: ca2d7af43c1bc0658edf7477fbcfdb0a32955b4a --- www/js/MonitorCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'www/js/MonitorCtrl.js') diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 42683717..97110760 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -31,7 +31,7 @@ angular.module('zmApp.controllers') $ionicPlatform.registerBackButtonAction(function (e) { e.preventDefault(); - if ($scope.modal.isShown()) { + if ($scope.modal != undefined && $scope.modal.isShown()) { // switch off awake, as liveview is finished ZMDataModel.zmDebug("Modal is open, closing it"); ZMDataModel.setAwake(false); -- cgit v1.2.3