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 EuiNavDrawer to not rely on managleable function names #2178

Merged

Conversation

chandlerprall
Copy link
Contributor

@chandlerprall chandlerprall commented Jul 29, 2019

Summary

Fixes #2175

When minified, EuiNavDrawerGroup's function name is shortened/mangled which caused the logic in EuiNavDrawer to break: if (child.type.name === 'EuiNavDrawerGroup') {

Instead of relying on the string name, this changes the logic to check for identity instead.

Checklist

- [ ] Checked in dark mode
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples
- [ ] Added or updated jest tests

  • Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@chandlerprall chandlerprall requested a review from thompsongl July 29, 2019 16:50
Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM. Built docs and tested manually with a local server. Verified it still works in with the dev build, also.

@chandlerprall chandlerprall merged commit d378af1 into elastic:master Jul 29, 2019
@chandlerprall chandlerprall deleted the bug/2175-nav-drawer-in-prod-builds branch July 29, 2019 17:07
thompsongl pushed a commit to thompsongl/eui that referenced this pull request Sep 10, 2019
)

* Fix EuiNavDrawer to not rely on managleable function names

* changelog
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.

Nav Drawer flyoutMenu broken on production build (documentation's example/CRA)
2 participants