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 broken compatibility of getNames #190

Closed
danilofuchs opened this issue Jul 29, 2020 · 2 comments · Fixed by #206
Closed

Fix broken compatibility of getNames #190

danilofuchs opened this issue Jul 29, 2020 · 2 comments · Fixed by #206

Comments

@danilofuchs
Copy link
Contributor

This is an issue generated from this comment by @sebastien-prudhomme: #175 (comment)

Since #175, getNames is not following the expected behaviour.
It may return either a name or a names array. This can break integrations and may require weird code to handle this inconsistency. Perhaps we should add an options parameter: { alternativeNames?: boolean }.

By default, the library should return only the first name of the array (alternativeNames = false).

@ngdangtu-vn
Copy link
Contributor

May I fix this issue? Today is late, so I will fix it and PR tomorrow.

@michaelwittig
Copy link
Owner

@ngdangtu-vn sounds good!

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 a pull request may close this issue.

3 participants