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

bug(web): fix connection annotations #4039

Merged
merged 1 commit into from
Jun 25, 2024
Merged
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
10 changes: 10 additions & 0 deletions lib/ts-lib/src/connection-annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ export function connectionAnnotationFitsReference(
{ tokens: targetCa }: ConnectionAnnotation,
{ tokens: referenceCa }: ConnectionAnnotation,
) {
// If the length is longer than 1, we assume you have already parsed the
// connection annotations. Otherwise, we need to parse them.
if (targetCa.length === 1) {
// @ts-ignore
targetCa = parseConnectionAnnotation(targetCa[0]);
}
if (referenceCa.length === 1) {
// @ts-ignore
referenceCa = parseConnectionAnnotation(referenceCa[0]);
}
// a fitting target annotation is either the same as the reference one or a supertype thereof
const lowerTargetCa = _.map(targetCa, (a) => a.toLowerCase());
const lowerReferenceCa = _.map(referenceCa, (a) => a.toLowerCase());
Expand Down
Loading