Skip to content

Commit 05a1ee8

Browse files
chore: Change test to mimic component behavior
1 parent bcb6dda commit 05a1ee8

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/components/summit-dropdown/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ export default class SummitDropdown extends React.Component {
3737

3838
handleClick(ev) {
3939
ev.preventDefault();
40-
if (
41-
this.state.summitValue !== null &&
42-
typeof this.state.summitValue === OBJECT_TYPEOF &&
43-
typeof this.state.summitValue.value !== UNDEFINED_TYPEOF
44-
)
40+
if ( this.state?.summitValue?.value !== undefined )
4541
this.props.onClick(this.state.summitValue.value);
4642
}
4743

0 commit comments

Comments
 (0)