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 allRefNames on assembly #1390

Merged
merged 2 commits into from Nov 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/core/assemblyManager/assembly.ts
Expand Up @@ -155,9 +155,11 @@ export default function assemblyFactory(assemblyConfigType: IAnyType) {
if (!(this.refNames && self.refNameAliases)) {
return undefined
}
let aliases: string[] = []
self.refNameAliases.forEach(aliasList => {
aliases = aliases.concat(aliasList)
const aliases: string[] = []
self.refNameAliases.forEach((_canonicalName, alias) => {
if (this.refNames && !this.refNames.includes(alias)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refNameAliases contains the canonical refNames so should be able to return keys of refNameAliases only

aliases.push(alias)
}
})
return [...this.refNames, ...aliases]
},
Expand Down