summaryrefslogtreecommitdiff
path: root/www/js/DataModel.js
diff options
context:
space:
mode:
authorpliablepixels <pliablepixels@gmail.com>2016-03-18 15:09:41 -0400
committerpliablepixels <pliablepixels@gmail.com>2016-03-18 15:09:41 -0400
commit8400f93f0b4841eb967e32e9dd500c0e66a93a87 (patch)
tree47934fbadfbf9152f6bc78911d0ea5af6e6434c0 /www/js/DataModel.js
parent0948cb4d472784946a6d54e4797d20183cdcc799 (diff)
#200 - if you delete Demo, it won't come back
Former-commit-id: 51e4371b9be198767fd579ff4073f28649479cbc
Diffstat (limited to 'www/js/DataModel.js')
-rw-r--r--www/js/DataModel.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 7207df83..70fd5caf 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -213,7 +213,7 @@ angular.module('zmApp.controllers')
var tLd = serverGroupList[loginData.serverName];
var keepBuilding = true;
- while (keepBuilding==true)
+ while (keepBuilding==true && tLd)
{
if (arrayObjectIndexOf(chainURLs,tLd.url,"url") == -1 ) // no loop
{
@@ -223,6 +223,11 @@ angular.module('zmApp.controllers')
if (tLd.fallbackConfiguration)
{
tLd = serverGroupList [tLd.fallbackConfiguration];
+ if (tLd == undefined)
+ {
+ // This can happen if the fallback profile was deleted
+ zmLog ("Looks like a server object was deleted, but is still in fallback");
+ }
}
else
{
@@ -320,7 +325,11 @@ angular.module('zmApp.controllers')
//console.log ("************ FOUND SERVER NAME " + as[x]);
// if serverGroupList[x]
}
- if (!isFoundDemo)
+
+ // Don't add the demo if there is another server
+ // because this means the user deleted it
+
+ if (!isFoundDemo && as.length == 0)
{
zmDebug ("Pushing demo server config to server groups");
//serverGroupList.push(demoS);