Skip to content

Commit

Permalink
Set onComplete handler as optional in Range cell component (#27987)
Browse files Browse the repository at this point in the history
Range cell component is used in multiple components but not all of them require the onComplete handler so it should be optional.
  • Loading branch information
fluiddot authored Jan 5, 2021
1 parent bf2fc09 commit 58d0ddf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ class BottomSheetRangeCell extends Component {
sliderValue: nextValue,
} );
onChange( nextValue );
onComplete( nextValue );
if ( onComplete ) {
onComplete( nextValue );
}
}

render() {
Expand Down

0 comments on commit 58d0ddf

Please sign in to comment.