mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-29 04:50:14 +00:00
Don't need else when doing early return
This commit is contained in:
parent
a31b0a8ed8
commit
8c05a39dec
1 changed files with 1 additions and 2 deletions
|
|
@ -25,9 +25,8 @@ const WebampIcon = (props: Props) => {
|
|||
const handleClick = (e: MouseEvent) => {
|
||||
if (ref.current != null && ref.current.contains(e.target as Element)) {
|
||||
return;
|
||||
} else {
|
||||
setSelected(false);
|
||||
}
|
||||
setSelected(false);
|
||||
};
|
||||
document.addEventListener("click", handleClick);
|
||||
return () => document.removeEventListener("click", handleClick);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue