File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/components/structures Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,12 @@ export class ContextMenu extends React.PureComponent<IProps, IState> {
322322
323323 const menuClasses = classNames ( {
324324 'mx_ContextualMenu' : true ,
325- // Defensively check for counter cases
325+ /**
326+ * In some cases we may get the number of 0, which still means that we're supposed to properly
327+ * add the specific position class, but as it was falsy things didn't work as intended.
328+ * In addition, defensively check for counter cases where we may get more than one value,
329+ * even if we shouldn't.
330+ */
326331 'mx_ContextualMenu_left' : ! hasChevron && position . left !== undefined && ! position . right ,
327332 'mx_ContextualMenu_right' : ! hasChevron && position . right !== undefined && ! position . left ,
328333 'mx_ContextualMenu_top' : ! hasChevron && position . top !== undefined && ! position . bottom ,
You can’t perform that action at this time.
0 commit comments