Skip to content

Commit

Permalink
Handle NaN data better in histogram (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck authored Jan 6, 2025
1 parent fb04918 commit c10791d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/histogram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HistogramData {
let min, max, i;
for (i = 0; i < count; i++) {
const v = valueFunc(i);
if (v !== undefined) {
if (v !== undefined && !isNaN(v)) {
min = max = v;
break;
}
Expand Down

0 comments on commit c10791d

Please sign in to comment.