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

[7.x] [ML] Fixes getTab() to always return an array. (#45616) #45630

Merged
merged 1 commit into from
Sep 13, 2019

Conversation

walterra
Copy link
Contributor

Backports the following commits to 7.x:

- Fixes getTabs() to always return an array. I was wondering why TypeScript didn't flag the tabs.map(...) part because tabs could possibly be undefined. It's because Record assumes that every key exists. More on that can be found in this blog post.
- This PR fixes a) the type of TAB_MAP by wrapping it in Partial<...> so it correctly flags the tabs.map() part with tabs possibly being undefined and b) fixes getTabs()'s return value by always returning an array.
@walterra walterra self-assigned this Sep 13, 2019
@walterra walterra added the :ml label Sep 13, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@walterra walterra merged commit 3ebf705 into elastic:7.x Sep 13, 2019
@walterra walterra deleted the backport/7.x/pr-45616 branch September 13, 2019 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants