Skip to content

Fix EuiNavDrawer to not rely on managleable function names#2178

Merged
chandlerprall merged 2 commits intoelastic:masterfrom
chandlerprall:bug/2175-nav-drawer-in-prod-builds
Jul 29, 2019
Merged

Fix EuiNavDrawer to not rely on managleable function names#2178
chandlerprall merged 2 commits intoelastic:masterfrom
chandlerprall:bug/2175-nav-drawer-in-prod-builds

Conversation

@chandlerprall
Copy link
Copy Markdown
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
Copy Markdown
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