Skip to content

[7.x] [SIEM] Fixes a crash when Machine Learning influencers is an undefined value (#42198)#42309

Merged
FrankHassanabad merged 1 commit intoelastic:7.xfrom
FrankHassanabad:backport/7.x/pr-42198
Jul 31, 2019
Merged

[7.x] [SIEM] Fixes a crash when Machine Learning influencers is an undefined value (#42198)#42309
FrankHassanabad merged 1 commit intoelastic:7.xfrom
FrankHassanabad:backport/7.x/pr-42198

Conversation

@FrankHassanabad
Copy link
Contributor

Backports the following commits to 7.x:

…d value (elastic#42198)

## Summary

Fixes a crashing bug when Machine Learning influencers is an undefined value:

https://github.com/elastic/ingest-dev/issues/611

```ts
TypeError: Cannot read property 'find' of undefined
    at getNetworkFromInfluencers (https://siem-dev-kibana.app.elstc.co/bundles/siem.bundle.js:41744:33)
    at https://siem-dev-kibana.app.elstc.co/bundles/siem.bundle.js:43012:83
    at Array.reduce (<anonymous>)
    at convertAnomaliesToNetwork (https://siem-dev-kibana.app.elstc.co/bundles/siem.bundle.js:43004:32)
    at https://siem-dev-kibana.app.elstc.co/bundles/siem.bundle.js:42830:78
    at renderWithHooks (webpack://%5Bname%5D/./node_modules/react-dom/cjs/react-dom.development.js?:12839:18)
    at updateFunctionComponent (webpack://%5Bname%5D/./node_modules/react-dom/cjs/react-dom.development.js?:14421:20)
    at beginWork (webpack://%5Bname%5D/./node_modules/react-dom/cjs/react-dom.development.js?:15431:16)
    at performUnitOfWork (webpack://%5Bname%5D/./node_modules/react-dom/cjs/react-dom.development.js?:19106:12)
    at workLoop (webpack://%5Bname%5D/./node_modules/react-dom/cjs/react-dom.development.js?:19146:24)
```

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
@FrankHassanabad FrankHassanabad added the backport This PR is a backport of another PR label Jul 30, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@FrankHassanabad FrankHassanabad merged commit 1045c37 into elastic:7.x Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants