Skip to content

Commit

Permalink
Explicitly handle nullish case
Browse files Browse the repository at this point in the history
  • Loading branch information
prestoncraw committed Dec 20, 2024
1 parent 4e2c148 commit d7a3c55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react-graph/src/PointNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export class PointNode {
return this.count;

// Include edges if specified
if (IncludeEdges)
if (IncludeEdges ?? false)
return this.points.filter((pt, i) => (pt[0] >= Tstart && pt[0] <= Tend) || (i < (this.points!.length - 1) && this.points![i + 1][0] >= Tstart) || (i > 0 && this.points![i - 1][0] <= Tend)).length;

// Standard range filtering
Expand Down

0 comments on commit d7a3c55

Please sign in to comment.