Skip to content

Commit 79dff9d

Browse files
committed
Bail upon non-existant node element
1 parent 617159b commit 79dff9d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clusterize.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@
176176
opts.cluster_height = 0;
177177
if( ! rows.length) return;
178178
var nodes = this.content_elem.children;
179+
if( ! nodes.length) return;
179180
var node = nodes[Math.floor(nodes.length / 2)];
180181
opts.item_height = node.offsetHeight;
181182
// consider table's border-spacing

0 commit comments

Comments
 (0)