File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/components/structures Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -322,10 +322,11 @@ export class ContextMenu extends React.PureComponent<IProps, IState> {
322322
323323 const menuClasses = classNames ( {
324324 'mx_ContextualMenu' : true ,
325- 'mx_ContextualMenu_left' : ! hasChevron && position . left ,
326- 'mx_ContextualMenu_right' : ! hasChevron && position . right ,
327- 'mx_ContextualMenu_top' : ! hasChevron && position . top ,
328- 'mx_ContextualMenu_bottom' : ! hasChevron && position . bottom ,
325+ // Defensively check for counter cases
326+ 'mx_ContextualMenu_left' : ! hasChevron && position . left !== undefined && ! position . right ,
327+ 'mx_ContextualMenu_right' : ! hasChevron && position . right !== undefined && ! position . left ,
328+ 'mx_ContextualMenu_top' : ! hasChevron && position . top !== undefined && ! position . bottom ,
329+ 'mx_ContextualMenu_bottom' : ! hasChevron && position . bottom !== undefined && ! position . top ,
329330 'mx_ContextualMenu_withChevron_left' : chevronFace === ChevronFace . Left ,
330331 'mx_ContextualMenu_withChevron_right' : chevronFace === ChevronFace . Right ,
331332 'mx_ContextualMenu_withChevron_top' : chevronFace === ChevronFace . Top ,
You can’t perform that action at this time.
0 commit comments