- this.curProject = cfg.projects[0];
-
- this.confValid = (cfg.projects.length && this.curProject.id != null);
+ if ("projects" in cfg) {
+ this.curProject = cfg.projects[0];
+ this.confValid = (cfg.projects.length && this.curProject.id != null);
+ } else {
+ this.curProject = null;
+ this.confValid = false;
+ }