Skip to content

Commit

Permalink
Merge pull request #183 from teodragovic/master
Browse files Browse the repository at this point in the history
removeEmptyRanks - replace _.has() method with more generic check
  • Loading branch information
cpettitt committed Jun 7, 2015
2 parents f133ab6 + 7d632a7 commit 472b5ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function removeEmptyRanks(g) {
var layers = [];
_.each(g.nodes(), function(v) {
var rank = g.node(v).rank - offset;
if (!_.has(layers, rank)) {
if (!layers[rank]) {
layers[rank] = [];
}
layers[rank].push(v);
Expand Down

0 comments on commit 472b5ef

Please sign in to comment.