Skip to content

Commit

Permalink
Ensuring that the evidence.identity format is maintained after compon…
Browse files Browse the repository at this point in the history
…ents are trimmed (#1591)

Co-authored-by: emcfins <erin.mcgill@gmail.com>
  • Loading branch information
emcfins and erinmcgill authored Jan 23, 2025
1 parent 5b96b6c commit 3d35d2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6026,7 +6026,8 @@ export function trimComponents(components) {
}
// comp.evidence.identity can be an array or object
// Merge the evidence.identity based on methods or objects
const identities = Array.isArray(comp.evidence.identity)
const isArray = Array.isArray(comp.evidence.identity);
const identities = isArray
? comp.evidence.identity
: [comp.evidence.identity];
for (const aident of identities) {
Expand Down Expand Up @@ -6057,6 +6058,11 @@ export function trimComponents(components) {
existingComponent.evidence.identity.push(aident);
}
}
if (!isArray) {
existingComponent.evidence = {
identity: existingComponent.evidence.identity[0],
};
}
}
// If the component is required in any of the child projects, then make it required
if (
Expand Down
2 changes: 1 addition & 1 deletion types/lib/cli/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d35d2a

Please sign in to comment.