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

[Lens] Fix crash when switching from subtype to subtype #49915

Merged

Conversation

wylieconlon
Copy link
Contributor

Fixes a crash that happens every time in the chart switcher when switching from a type like Bar to Line. This bug happened because the suggestion being build did not include datasourceId, which was also used in the logic to remove layers. This still lets us clear layers when switching between two separate datasources without breaking the same-datasource case.

@wylieconlon wylieconlon added Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Lens v7.5.0 v7.6.0 labels Oct 31, 2019
@wylieconlon wylieconlon requested review from chrisdavies and a team October 31, 2019 19:36
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@wylieconlon wylieconlon changed the title [Lens] Fix bug with switching from subtype to subtype [Lens] Fix crash when switching from subtype to subtype Oct 31, 2019
@@ -397,6 +397,7 @@ describe('chart_switch', () => {
initialState: 'therebedragons',
})
);
expect(frame.removeLayers).not.toHaveBeenCalled();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had accidentally removed this line in the test, which was the whole point

Copy link
Contributor

@chrisdavies chrisdavies left a comment

Choose a reason for hiding this comment

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

LGTM;

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.5.0 v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants