Skip to content

Commit

Permalink
fix isComparisonFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Volland committed Feb 21, 2022
1 parent 9b86b25 commit a21e83b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typeguards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const isFilter = (got: any): got is Filter => {
isNegationFilter(got);
};
export const isComparisonFilter = (got: any): got is ComparisonFilter => {
const expectedLength = got[0] === '<=x<=' ? 4 : 3;
const expectedLength = got && got[0] === '<=x<=' ? 4 : 3;
return Array.isArray(got) &&
got.length === expectedLength &&
isComparisonOperator(got[0]) &&
Expand Down

0 comments on commit a21e83b

Please sign in to comment.