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 and guarani committed Jan 5, 2021
1 parent fce8e49 commit 1eda213
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 1eda213

Please sign in to comment.