diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-23 13:45:42 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-23 13:45:42 -0500 |
| commit | 3713ae20e93eafbf21dd313332aa78e85901b75e (patch) | |
| tree | f8da7cb999249c8193142abca7ef8ab1aaa1fd41 /www | |
| parent | 976f50450cf338d03306ec715f6138ca19750d21 (diff) | |
#570 catch filter parse errors
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MomentCtrl.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js index 1cb080b3..64198c2d 100644 --- a/www/js/MomentCtrl.js +++ b/www/js/MomentCtrl.js @@ -774,7 +774,15 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ $scope.loadingStatus = $translate.instant('kLoading'); $scope.gridSize = ld.momentGridSize; - excludeMonitors = JSON.parse(ld.momentMonitorFilter || []); + //console.log ("---------->Filter before "+ld.momentMonitorFilter); + + try { + excludeMonitors = JSON.parse(ld.momentMonitorFilter); + } + catch (e) { + excludeMonitors = []; + } + console.log("RETRIEVED EXCLUDE=" + JSON.stringify(excludeMonitors)); constructMask(); $scope.isSubMenu = ld.enableMomentSubMenu; |
