Skip to content

Commit c1b78ca

Browse files
authored
Handle the case where submenu is missing
1 parent 505641e commit c1b78ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/SubMenu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export default class SubMenu extends AbstractMenu {
6868
if (this.props.forceOpen || this.state.visible) {
6969
const wrapper = window.requestAnimationFrame || setTimeout;
7070
wrapper(() => {
71+
if (!this.subMenu) return;
7172
const styles = this.props.rtl
7273
? this.getRTLMenuPosition()
7374
: this.getMenuPosition();

0 commit comments

Comments
 (0)