Skip to content

Commit 68befd5

Browse files
committed
Resolved "Cannot read property 'simulation' of undefined"
1 parent 1964c1d commit 68befd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/components/provenance/provenance-graph/provenance-graph.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export class ProvenanceGraphComponent implements AfterViewInit, OnChanges {
4242

4343
ngOnChanges(changes: SimpleChanges) {
4444
this.initGraph();
45-
this.graph.simulation.tick(100);
45+
if (this.graph) {
46+
this.graph.simulation.tick(100);
47+
}
4648
}
4749

4850
initGraph() {

0 commit comments

Comments
 (0)