소스 검색

panel-header: Simplify condition

Johannes Schill 7 년 전
부모
커밋
0430bb47c2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      public/app/core/components/Tooltip/Popover.tsx

+ 1 - 1
public/app/core/components/Tooltip/Popover.tsx

@@ -6,7 +6,7 @@ class Popover extends PureComponent<UsingPopperProps> {
   render() {
   render() {
     const { children, hidePopper, showPopper, className, ...restProps } = this.props;
     const { children, hidePopper, showPopper, className, ...restProps } = this.props;
 
 
-    const togglePopper = restProps.show === true ? hidePopper : showPopper;
+    const togglePopper = restProps.show ? hidePopper : showPopper;
 
 
     return (
     return (
       <div className={`popper__manager ${className}`} onClick={togglePopper}>
       <div className={`popper__manager ${className}`} onClick={togglePopper}>