Skip to content

Commit

Permalink
fix: prevent thumbValue to be NaN and crash component
Browse files Browse the repository at this point in the history
  • Loading branch information
Mlobaievskyi committed May 8, 2024
1 parent df75fb1 commit 94351f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/slide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ export const Slider: FC<AwesomeSliderProps> = memo(function Slider({
return clamp(currentValue, 0, width.value - thumbWidth);
},
(data) => {
if (data !== undefined) {
if (data !== undefined && !isNaN(data) {
thumbValue.value = data;
}
},
Expand Down

0 comments on commit 94351f3

Please sign in to comment.