Skip to content

Commit b72d9b2

Browse files
committed
Fix - TTree::Draw with labels
Wrong compbination of ?? and ? operators
1 parent 313cc21 commit b72d9b2

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
@@ -1053,7 +1053,7 @@ class TDrawSelector extends TSelector {
10531053
res.k = res.nbins / (res.max - res.min);
10541054

10551055
res.GetBin = function(value) {
1056-
const bin = this.lbls?.indexOf(value) ?? Number.isFinite(value) ? Math.floor((value - this.min) * this.k) : this.nbins + 1;
1056+
const bin = this.lbls?.indexOf(value) ?? (Number.isFinite(value) ? Math.floor((value - this.min) * this.k) : this.nbins + 1);
10571057
return bin < 0 ? 0 : ((bin > this.nbins) ? this.nbins + 1 : bin + 1);
10581058
};
10591059

0 commit comments

Comments
 (0)