diff --git a/src/components/Marquee/Marquee.tsx b/src/components/Marquee/Marquee.tsx index 84b56afe..97262ada 100644 --- a/src/components/Marquee/Marquee.tsx +++ b/src/components/Marquee/Marquee.tsx @@ -159,7 +159,8 @@ export const Marquee: FC = ({ width: '100%', cursor: onClick ? 'pointer' : 'default', - '--duration': `${duration}s`, + // `toFixed` fixes a weird bug with `duration` infinitely changing on pause + '--duration': `${duration.toFixed(4)}s`, '--delay': `${delay}s`, '--direction': direction === 'left' ? 'normal' : 'reverse', '--margin-right': `${marqueeWidth < containerWidth ? containerWidth - marqueeWidth : 0}px`,