From c9717171d9d8dafdc25edc06b16f8fc5aee15113 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 11 Sep 2018 15:34:58 -0400 Subject: fixed event page reload issue from last-state - if param is null make it 0 --- www/js/EventCtrl.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'www/js/EventCtrl.js') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 2a9565c1..0d825eb4 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -166,6 +166,9 @@ angular.module('zmApp.controllers') document.addEventListener("pause", onPause, false); //console.log("I got STATE PARAM " + $stateParams.id); $scope.id = parseInt($stateParams.id, 10); + + if (isNaN($scope.id)) $scope.id = 0; + $scope.showEvent = $stateParams.playEvent || false; $scope.monitors = NVRDataModel.getMonitorsNow(); -- cgit v1.2.3