Skip to content

Commit 68b0e03

Browse files
#RI-2974-fix checks (#700)
1 parent 7d2bb83 commit 68b0e03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redisinsight/ui/src/components/range-filter/RangeFilter.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ const RangeFilter = (props: Props) => {
116116
}, [end])
117117

118118
useEffect(() => {
119-
if (max && prevValue && prevValue.max !== max && end === prevValue.max) {
119+
if (prevValue.max !== max && end === prevValue.max) {
120120
handleUpdateRangeMax(max)
121121
}
122-
if (min && prevValue && prevValue.min !== min && start === prevValue.min) {
122+
if (prevValue.min !== min && start === prevValue.min) {
123123
handleUpdateRangeMin(min)
124124
}
125125
}, [prevValue])
126126

127-
if (start === 0 && end === 0) {
127+
if (start === 0 && max !== 0 && end === 0 && min !== 0) {
128128
return (
129129
<div data-testid="mock-blank-range" className={styles.rangeWrapper}>
130130
<div className={cx(styles.sliderTrack, styles.mockRange)} />

0 commit comments

Comments
 (0)