Skip to content

Commit

Permalink
fix: Ensure we do not blatantly update the path aliases. Check whethe…
Browse files Browse the repository at this point in the history
…r alias is set in the first place
  • Loading branch information
nklomp committed Jul 24, 2024
1 parent 6334ca2 commit cf9203f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/evaluation/evaluationClientWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,11 @@ export class EvaluationClientWrapper {
private updateSubmissionRequirementMatchPathToAlias(submissionRequirementMatch: SubmissionRequirementMatch, alias: string) {
const vc_path: string[] = [];
submissionRequirementMatch.vc_path.forEach((m) => {
vc_path.push(m.replace('$', '$.' + alias));
if (m.startsWith(`$.${alias}`)) {
vc_path.push(m);
} else {
vc_path.push(m.replace('$', `$.${alias}`));
}
});
submissionRequirementMatch.vc_path = vc_path;
if (submissionRequirementMatch.from_nested) {
Expand Down

0 comments on commit cf9203f

Please sign in to comment.