From a8f91b80946aecd460543c551dd30dc9db401e5f Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 2 Nov 2018 14:32:31 -0400 Subject: odd case? --- www/js/DataModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'www/js/DataModel.js') diff --git a/www/js/DataModel.js b/www/js/DataModel.js index c558d884..3e5f41c1 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -408,7 +408,7 @@ angular.module('zmApp.controllers') var as = 'undefined'; - if (!mid && monitors.length > 0) { + if (!mid && monitors && monitors.length > 0) { mid = monitors[0].Monitor.Id; } @@ -2145,7 +2145,7 @@ angular.module('zmApp.controllers') .then(function (data) { // console.log("HTTP success got " + JSON.stringify(data.monitors)); data = data.data; - monitors = data.monitors; + if (data.monitors) monitors = data.monitors; if ($rootScope.authSession == 'undefined') { -- cgit v1.2.3