Displaying the graph also if tenants are not present
Prevent routes from beeing duplicated

Change-Id: Icf6967d450f32e8d80f365c1be3181e3c10c178e
diff --git a/src/app/service-graph/services/graph.store.ts b/src/app/service-graph/services/graph.store.ts
index 9ab1a5d..2266329 100644
--- a/src/app/service-graph/services/graph.store.ts
+++ b/src/app/service-graph/services/graph.store.ts
@@ -28,9 +28,14 @@
     subscribers: []
   });
 
+  private emptyGraph: IXosServiceGraph = {
+    nodes: [],
+    links: []
+  };
+
   // representation of the graph as D3 requires
-  private d3CoarseGraph = new BehaviorSubject({});
-  private d3FineGrainedGraph = new BehaviorSubject({});
+  private d3CoarseGraph = new BehaviorSubject(this.emptyGraph);
+  private d3FineGrainedGraph = new BehaviorSubject(this.emptyGraph);
 
   // storing locally reference to the data model
   private services;
@@ -240,7 +245,6 @@
   }
 
   private graphDataToFineGrainedGraph(data: IXosFineGrainedGraphData) {
-
     try {
       data = this.removeUnwantedFineGrainedData(data);
 
@@ -292,7 +296,7 @@
         return links;
       }, []);
 
-      if (nodes.length === 0 || links.length === 0) {
+      if (nodes.length === 0 && links.length === 0) {
         return;
       }
 
@@ -304,11 +308,9 @@
       _.forEach(this.XosServiceGraphExtender.getFinegrained(), (r: IXosServiceGraphReducer) => {
         graph = r.reducer(graph);
       });
-
       this.d3FineGrainedGraph.next(graph);
     } catch (e) {
      this.d3FineGrainedGraph.error(e);
     }
   }
-
 }