diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-09-11 15:34:58 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-09-11 15:34:58 -0400 |
| commit | c9717171d9d8dafdc25edc06b16f8fc5aee15113 (patch) | |
| tree | 09c69e739feff2da353ea2c47d50cf287ebbbf24 | |
| parent | 1a1d38813109ade00d6b073556aaad4f443d3f5c (diff) | |
fixed event page reload issue from last-state - if param is null make it 0
| -rw-r--r-- | www/js/EventCtrl.js | 3 | ||||
| -rwxr-xr-x | www/js/app.js | 2 |
2 files changed, 4 insertions, 1 deletions
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(); diff --git a/www/js/app.js b/www/js/app.js index e8829520..b5f1b804 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1788,7 +1788,7 @@ angular.module('zmApp', [ // to work in Windows - NVRDataModel.debug ("Setting last-desktop-state to:"+JSON.stringify(toState)); + NVRDataModel.debug ("Setting last-desktop-state to:"+JSON.stringify(toState)+" with params:"+JSON.stringify(toParams)); localforage.setItem('last-desktop-state', { 'name': toState, 'params': toParams |
