CommandBar: Click on MenuItem without children leads to null error
Bug Report
- Package version(s): 1.3.5
Describe the issue:
Using CommandBar with top-level IContextualMenuItem-Items leads to an error in https://github.com/OfficeDev/office-ui-fabric-react/blob/master/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx#L320, if they have an onClick-Handler.
In the Line 320: if (this.state.contextualMenuProps.onDismiss), contextualMenuProps is null.
Actual behavior:
contextualMenuProps is null
Expected behavior:
The if-Statement should check if contextualMenuProps is null
Got the same problem. Is there a workaround for now?
Patch incoming.
I've expedited a patch release to address. @MLoughry please review the fix as I believe your change introduced this.
https://github.com/OfficeDev/office-ui-fabric-react/releases/tag/office-ui-fabric-react_v1.3.6
Awesome, thank you