MurhafSousli / ngx-scrollbar

Custom overlay-scrollbars with native scrolling mechanism
https://ngx-scrollbar.netlify.app/
MIT License
618 stars 99 forks source link

scrollTimelinePolyfill is causing errors #594

Closed Sergiobop closed 3 months ago

Sergiobop commented 6 months ago

Expected Behavior

No errors

Actual Behavior

I'm using Sentry, and my error log is full of TypeErrors caused by the polyfill. I don't know if we can do something to avoid them.

I will paste some errors:

1 TypeError setNativeCurrentTime(scroll-timeline/src/proxy-animation)

TypeError
Animation.currentTime setter: Value being assigned is not a finite floating-point value.

Sentry points at line 480: setNativeCurrentTime at line 480:42 of https://flackr.github.io/scroll-timeline/src/proxy-animation.js

timeline.currentTime &&
timeline.currentTime.value == (playbackRate < 0 ? 0 : 100);
const delta = atScrollTimelineBoundary ? (playbackRate < 0 ? 0.001 : -0.001) : 0;
details.animation.currentTime = time + delta; // This one

2 TypeError The provided value is non-finite (same line, details.animation.currentTime = time + delta;)

The provided value is non-finite

Environment

Looks like other people have the problem too: https://github.com/flackr/scroll-timeline/issues/254#issuecomment-2095226901

MurhafSousli commented 5 months ago

I am not familiar with Sentry, but I guess I get the idea, you need to find an option in Sentry to ignore this file. the polyfill is pure JS, and has no types and these kind of systems will always complain about typo stuff. The other option is to try to convince polyfill dev team, it is outside our control.