Skip to content

Commit

Permalink
chore: use ternanry
Browse files Browse the repository at this point in the history
  • Loading branch information
Arucard89 committed Apr 5, 2024
1 parent 4a9cdfb commit 69f2a35
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ export const SelectControl = React.forwardRef<HTMLButtonElement, ControlProps>((
}
const count = Number(value?.length) || 0;
const counterComponent = <SelectCounter count={count} size={size} disabled={disabled} />;
if (renderCounter) {
return renderCounter(counterComponent, {count, size, disabled});
}
return counterComponent;
return renderCounter
? renderCounter(counterComponent, {count, size, disabled})
: counterComponent;
};

const renderClearIcon = (args: SelectRenderClearArgs) => {
Expand Down

0 comments on commit 69f2a35

Please sign in to comment.