Browse Source

prefer logical AND over ternary (#13254)

pull/13265/head
Anuj 6 years ago
committed by 偏右
parent
commit
e0298dcc13
  1. 2
      components/checkbox/Checkbox.tsx

2
components/checkbox/Checkbox.tsx

@ -116,7 +116,7 @@ export default class Checkbox extends React.Component<CheckboxProps, {}, {}> {
className={checkboxClass}
ref={this.saveCheckbox}
/>
{children !== undefined ? <span>{children}</span> : null}
{children !== undefined && <span>{children}</span>}
</label>
);
}

Loading…
Cancel
Save