Skip to content

Commit 1f08c3e

Browse files
committed
unnecessary else block
1 parent 1b923c9 commit 1f08c3e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/lib/helpers/doIfElseOperation.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ export function doIfElseOperation(props, Component) {
88
return React.createElement(Component, restProps);
99
}
1010

11-
if (!condition) {
12-
if (typeof elseBlock === 'function') {
13-
return React.createElement(elseBlock, restProps);
14-
}
15-
return elseBlock || null;
11+
if (typeof elseBlock === 'function') {
12+
return React.createElement(elseBlock, restProps);
1613
}
14+
return elseBlock || null;
1715
}

0 commit comments

Comments
 (0)