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 e3cab59 commit 6ff03b2Copy full SHA for 6ff03b2
src/scrollTo.js
@@ -202,15 +202,19 @@ export const scroller = () => {
202
}
203
204
205
+ if (onStart) onStart(element);
206
+
207
+ if (!diffY && !diffX) {
208
+ onDone(element);
209
+ return;
210
+ }
211
212
if (typeof easing === "string") {
213
easing = easings[easing] || easings["ease"];
214
215
216
easingFn = BezierEasing.apply(BezierEasing, easing);
217
- if (!diffY && !diffX) return;
- if (onStart) onStart(element);
-
218
_.on(container, abortEvents, abortFn, { passive: true });
219
220
window.requestAnimationFrame(step);
0 commit comments