Skip to content

Commit 9a87706

Browse files
committed
Simplify comparisons
1 parent ac3562d commit 9a87706

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/js/CheckboxTree.jsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,19 +289,17 @@ class CheckboxTree extends React.Component {
289289
renderGlobalOptions() {
290290
const { showExpandAll } = this.props;
291291

292-
if (!showExpandAll) {
293-
return null;
294-
}
295-
296-
return <GlobalActions onCollapseAll={this.onCollapseAll} onExpandAll={this.onExpandAll} />;
292+
return showExpandAll ? (
293+
<GlobalActions onCollapseAll={this.onCollapseAll} onExpandAll={this.onExpandAll} />
294+
) : null;
297295
}
298296

299297
renderHiddenInput() {
300298
const { checked, name, nameAsArray } = this.props;
301299

302-
return name === undefined ? null : (
300+
return name !== undefined ? (
303301
<HiddenInput checked={checked} name={name} nameAsArray={nameAsArray} />
304-
);
302+
) : null;
305303
}
306304

307305
render() {

0 commit comments

Comments
 (0)