prefer logical AND over ternary (#13254)

This commit is contained in:
Anuj 2018-11-22 21:42:37 -08:00 committed by 偏右
parent e36e5aa5a2
commit e0298dcc13

View File

@ -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>
);
}