Skip to content

Commit 372b19b

Browse files
s0afc163
authored andcommitted
[chore] fix logical error in SubMenu.jsx (#230)
not (!) binds more tightly than equality comparisons, so the previous expression would always evaluate to false, as true and false are not exactly equal to a string.
1 parent 0221ec0 commit 372b19b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SubMenu.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ export class SubMenu extends React.Component {
388388
// don't show transition on first rendering (no animation for opened menu)
389389
// show appear transition if it's not visible (not sure why)
390390
// show appear transition if it's not inline mode
391-
const transitionAppear = haveRendered || !baseProps.visible || !baseProps.mode === 'inline';
391+
const transitionAppear = haveRendered || !baseProps.visible || baseProps.mode !== 'inline';
392392

393393
baseProps.className = ` ${baseProps.prefixCls}-sub`;
394394
const animProps = {};

0 commit comments

Comments
 (0)