Skip to content

Commit

Permalink
fix: xyGrowingX bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Nov 12, 2024
1 parent e30189a commit afa483d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xy/xyGrowingX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function xyGrowingX(data: DataXY): DataXY {
throw new TypeError('length of x and y must be identical');
}

if (x.length < 2 || x[0] < x[x.at(-1) as number]) return data;
if (x.length < 2 || ((x[0] < x.at(-1)) as number)) return data;

Check failure on line 14 in src/xy/xyGrowingX.ts

View workflow job for this annotation

GitHub Actions / nodejs / lint-check-types

Conversion of type 'boolean' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

Check failure on line 14 in src/xy/xyGrowingX.ts

View workflow job for this annotation

GitHub Actions / nodejs / lint-check-types

Object is possibly 'undefined'.

return {
x: x.slice(0).reverse(),
Expand Down

0 comments on commit afa483d

Please sign in to comment.