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

fixing editor bug with apply being disabled in some cases #21333

Merged
merged 3 commits into from Jul 30, 2018

Conversation

Projects
None yet
4 participants
@ppisljar
Copy link
Member

ppisljar commented Jul 27, 2018

closes #21297

null values were not handled correctly

@timroes timroes requested a review from spalger Jul 27, 2018

@elasticmachine

This comment has been minimized.

Copy link

elasticmachine commented Jul 27, 2018

@timroes

This comment has been minimized.

Copy link
Contributor

timroes commented Jul 27, 2018

Jenkins, test this - hit flaky test

@elasticmachine

This comment has been minimized.

Copy link

elasticmachine commented Jul 27, 2018

@timroes
Copy link
Contributor

timroes left a comment

Code looks good. Validated that it fixes the issue (Chrome, Linux) and added a functional test that I checked, that it fails before applying the fix.

@elasticmachine

This comment has been minimized.

Copy link

elasticmachine commented Jul 27, 2018

@spalger
Copy link
Member

spalger left a comment

@ppisljar it'd be great if you could explain in the description why this works, I'm not sure based on the code what really changed.

One little nitpick, but LGTM. Pulled the code, seems to fix the bug. Thanks for the quick turnaround!

if (editorStateValue) {
// Keep traversing.
if (updateEditorStateWithChanges(newStateValue, oldStateValue, editorStateValue)) {
dirty = true;

This comment has been minimized.

Copy link
@spalger

spalger Jul 27, 2018

Member

Any reason this and other checks can't just return true to short circuit all other execution? I hope that checking for changes doesn't have some other effect on things...

This comment has been minimized.

Copy link
@ppisljar

ppisljar Jul 30, 2018

Author Member

the null values were treated incorectly (that was the problem)
we cant just return as we are udatingEditorState not checking if it changed ....

@ppisljar ppisljar merged commit e28f2f3 into elastic:master Jul 30, 2018

2 checks passed

CLA Commit author has signed the CLA
Details
kibana-ci Build finished.
Details

ppisljar added a commit to ppisljar/kibana that referenced this pull request Jul 30, 2018

ppisljar added a commit to ppisljar/kibana that referenced this pull request Jul 30, 2018

@ppisljar ppisljar deleted the ppisljar:fix/editorBug branch Jul 30, 2018

ppisljar added a commit that referenced this pull request Jul 30, 2018

ppisljar added a commit that referenced this pull request Jul 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.