We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0abb71b commit d0ecbf5Copy full SHA for d0ecbf5
src/components/DateRange/index.js
@@ -102,7 +102,7 @@ class DateRange extends Component {
102
}
103
const { rangeColors, ranges } = this.props;
104
const focusedRange = this.props.focusedRange || this.state.focusedRange;
105
- const color = ranges[focusedRange[0]].color || rangeColors[focusedRange[0]] || color;
+ const color = ranges[focusedRange[0]]?.color || rangeColors[focusedRange[0]] || color;
106
this.setState({ preview: { ...val.range, color } });
107
};
108
render() {
0 commit comments