File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/web/src/components/range Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -440,7 +440,8 @@ class DynamicRangeSlider extends Component {
440440 ) ;
441441 if ( props . range ) {
442442 // always keep the values within range
443- // props.range.start / (props.queryFormat !== dateFormats.epoch_second ? 1 : 1000) is required
443+ // props.range.start
444+ // (props.queryFormat !== dateFormats.epoch_second ? 1 : 1000) is required
444445 // since we need to convert the milliseconds value into seconds in case of epoch_second
445446 normalizedValue = [
446447 processedStart < props . range . start ? props . range . start : processedStart ,
@@ -632,7 +633,12 @@ class DynamicRangeSlider extends Component {
632633 }
633634
634635 render ( ) {
635- if ( ! this . state . currentValue || ! this . state . range || this . props . range . start === null ) {
636+ if (
637+ ! this . state . currentValue
638+ || ! this . state . range
639+ || this . props . range === null
640+ || this . props . range . start === null
641+ ) {
636642 return null ;
637643 }
638644
@@ -787,6 +793,10 @@ const mapStateToProps = (state, props) => {
787793 }
788794 if ( range ) {
789795 range = formatRange ( range ) ;
796+ // eslint-disable-next-line no-restricted-globals
797+ if ( isNaN ( range . start ) && isNaN ( range . end ) ) {
798+ range = null ;
799+ }
790800 }
791801 return {
792802 options,
You can’t perform that action at this time.
0 commit comments