Skip to content

Commit e60d2d0

Browse files
committed
Fix - TTree::Draw with labels
Wrong compbination of ?? and ? operators
1 parent bc6dc09 commit e60d2d0

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

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

0 commit comments

Comments
 (0)