Skip to content

Commit 14a9711

Browse files
committed
Fix - TTree::Draw with labels
Wrong compbination of ?? and ? operators
1 parent b3b171b commit 14a9711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/tree.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ class TDrawSelector extends TSelector {
11931193
res.k = res.nbins / (res.max - res.min);
11941194

11951195
res.GetBin = function(value) {
1196-
const bin = this.lbls?.indexOf(value) ?? Number.isFinite(value) ? Math.floor((value - this.min) * this.k) : this.nbins + 1;
1196+
const bin = this.lbls?.indexOf(value) ?? (Number.isFinite(value) ? Math.floor((value - this.min) * this.k) : this.nbins + 1);
11971197
return bin < 0 ? 0 : ((bin > this.nbins) ? this.nbins + 1 : bin + 1);
11981198
};
11991199

0 commit comments

Comments
 (0)