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

Display all collectors' names and add a test for this #472

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

orlinmalkja
Copy link
Contributor

@orlinmalkja orlinmalkja commented Sep 17, 2024

Closes #471

@orlinmalkja orlinmalkja self-assigned this Sep 17, 2024
if (collection.collector.length === 1) return [collection.collector[0].name];

let collectors: string[] = []
collection.collector.forEach((collector) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

To simplify this, you could use .map function. Also the return type should stay the same (string). This can be achieved by using .join(', ')after map with an inline return. Please pay attention to the space after comma.

@orlinmalkja
Copy link
Contributor Author

thanks for your comment! I fixed it, so please continue with your review.

@orlinmalkja orlinmalkja merged commit c6b1ebe into develop Sep 18, 2024
2 checks passed
orlinmalkja added a commit that referenced this pull request Oct 8, 2024
* chore: change the ahiqar arabic local karshuni file

* fix: display all collectors'names in metadata

* test: add a test for showing all collectors names

* chore: restore the file as it was before this PR

* refactor: write in a more compact way the function getCollectorName()

---------

Co-authored-by: malkja <[email protected]>
@orlinmalkja orlinmalkja deleted the fix-display-all-collector-names branch October 15, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants