From c96bbdf00e0876b2ea3e6386af7d6a0768e7b4d6 Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Mon, 25 Jun 2018 14:34:40 +0300 Subject: [PATCH] Code style fix. --- src/data-structures/graph/Graph.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/data-structures/graph/Graph.js b/src/data-structures/graph/Graph.js index 8e603c38..ae123ca1 100644 --- a/src/data-structures/graph/Graph.js +++ b/src/data-structures/graph/Graph.js @@ -115,9 +115,11 @@ export default class Graph { */ findEdge(startVertex, endVertex) { const vertex = this.getVertexByKey(startVertex.getKey()); + if (!vertex) { return null; } + return vertex.findEdge(endVertex); }