Skip to content

Commit ae0f5a5

Browse files
committed
remove conditional logic that does nothing
1 parent e0de9c7 commit ae0f5a5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/components/rl-dropdown.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export default Component.extend({
2020
let $target = event.target;
2121
let $c = this.element;
2222

23-
if ($target !== $c) {
24-
if ((closeOnChildClick === true || closeOnChildClick === 'true') && $target.closest($c).length) {
25-
this.set('isExpanded', false);
26-
} else if (closeOnChildClick && $target.closest(closeOnChildClick, $c).length) {
27-
this.set('isExpanded', false);
28-
}
23+
if ($target === $c) {
24+
return;
25+
}
26+
27+
if ($target.closest(closeOnChildClick, $c).length) {
28+
this.set('isExpanded', false);
2929
}
3030
},
3131
});

0 commit comments

Comments
 (0)