Skip to content

Commit

Permalink
Bail upon non-existant node element
Browse files Browse the repository at this point in the history
  • Loading branch information
mudcube committed Jan 27, 2018
1 parent 617159b commit 79dff9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clusterize.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
opts.cluster_height = 0;
if( ! rows.length) return;
var nodes = this.content_elem.children;
if( ! nodes.length) return;
var node = nodes[Math.floor(nodes.length / 2)];
opts.item_height = node.offsetHeight;
// consider table's border-spacing
Expand Down

0 comments on commit 79dff9d

Please sign in to comment.