From 941feda305fc7648505c63bf472b3a5725ac1881 Mon Sep 17 00:00:00 2001 From: Diego Paiva <32985519+diegopaiva1@users.noreply.github.com> Date: Mon, 6 Aug 2018 10:26:22 -0300 Subject: [PATCH] Fix kruskal's exception message for directed graph (#138) --- src/algorithms/graph/kruskal/kruskal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/graph/kruskal/kruskal.js b/src/algorithms/graph/kruskal/kruskal.js index 3f0ac44f..dd9968a0 100644 --- a/src/algorithms/graph/kruskal/kruskal.js +++ b/src/algorithms/graph/kruskal/kruskal.js @@ -10,7 +10,7 @@ export default function kruskal(graph) { // It should fire error if graph is directed since the algorithm works only // for undirected graphs. if (graph.isDirected) { - throw new Error('Prim\'s algorithms works only for undirected graphs'); + throw new Error('Kruskal\'s algorithms works only for undirected graphs'); } // Init new graph that will contain minimum spanning tree of original graph.