Skip to content

Commit 1f46c3f

Browse files
committed
optimize the case of empty bins
1 parent 2d41322 commit 1f46c3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transforms/bin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function bincumset([bin], j, bins) {
228228
}
229229

230230
function binfilter([{x0, x1}, set]) {
231-
return [x0, x1, I => I.filter(set.has, set)]; // TODO optimize
231+
return [x0, x1, set.size ? I => I.filter(set.has, set) : () => []]; // TODO optimize
232232
}
233233

234234
function maybeInset(inset, inset1, inset2) {

0 commit comments

Comments
 (0)