Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of function without library for Equal #322

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/helpers/elm/QueryFilterParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,11 @@
propRef = equal.operand[0] as ELMProperty;
}

if (propRef == null) {
withError.message = `could not resolve property ref for Equal:${equal.localId}. first operand is a ${equal.operand[0].type}`;

Check warning on line 724 in src/helpers/elm/QueryFilterParser.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
return { type: 'unknown', withError };

Check warning on line 725 in src/helpers/elm/QueryFilterParser.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

Check warning on line 726 in src/helpers/elm/QueryFilterParser.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

if (isOfTypeGracefulError(propRef)) {
return { type: 'unknown', withError: propRef };
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/errors/GracefulError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

export const isOfTypeGracefulError = (tbd: any): tbd is GracefulError => {
if ((tbd as GracefulError).message) {
if ((tbd as GracefulError)?.message) {

Check warning on line 9 in src/types/errors/GracefulError.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
return true;
}
return false;
Expand Down
Loading