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(sources): updates typings definitions #3035

Merged
merged 2 commits into from
Oct 8, 2020

Conversation

lionelB
Copy link
Contributor

@lionelB lionelB commented Oct 7, 2020

No description provided.

sources.find((key) => routeBySource[key] === slug) || slug;
const getSourceByRoute = (slug) => {
const [source] = routes.find(([, value]) => slug === value) || [];
return source ? source : null;
Copy link
Contributor

Choose a reason for hiding this comment

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

If think source | nullis enough here but not sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if you mean return source || null ? it's the same

Copy link
Contributor

Choose a reason for hiding this comment

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

👌

Copy link
Contributor

@UnbearableBear UnbearableBear left a comment

Choose a reason for hiding this comment

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

If it's ok for you it's ok for me

@lionelB lionelB merged commit 6e1659e into master Oct 8, 2020
@lionelB lionelB deleted the lionelb/update-cdtn-source-typing branch October 8, 2020 08:43
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.

3 participants