Skip to content

Commit 9753c3c

Browse files
author
Maja Grubic
committed
Removing unnecessary if statement
1 parent e14ac4e commit 9753c3c

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,8 @@ export function DiscoverFieldSearch({ onChange, value, types }: Props) {
221221
legend={legend}
222222
options={toggleButtons(id)}
223223
idSelected={`${id}-${values[id]}`}
224-
onChange={optionId => {
225-
if (optionId) {
226-
// @ts-ignore
227-
handleValueChange(id, optionId.match(/-([a-z]+)/)[1]);
228-
}
229-
}}
224+
// @ts-ignore
225+
onChange={optionId => handleValueChange(id, optionId.match(/-([a-z]+)/)[1])}
230226
buttonSize="compressed"
231227
isFullWidth
232228
data-test-subj={`${id}ButtonGroup`}

0 commit comments

Comments
 (0)