Describe the bug
Since the last version (2.2.0), our implementation (with server side rendering) returns the following error:
2022-02-11T15:17:14.232Z - error: uncaughtException: requestAnimationFrame is not defined
ReferenceError: requestAnimationFrame is not defined
at /Users/josemrodrigu/Projects/andes-library-test/node_modules/tiny-swiper/lib/index.min.js:1:2592
at /Users/josemrodrigu/Projects/andes-library-test/node_modules/tiny-swiper/lib/index.min.js:1:84
at Object.<anonymous> (/Users/josemrodrigu/Projects/andes-library-test/node_modules/tiny-swiper/lib/index.min.js:1:201)
Checking nextTick.ts, I noticed that nextFrame and cancelNextFrame constants are defined outside Tick(). Of course, Tick is never executed on the server. Now that those connstants are defined at file scope, this bug can see the light.
I'll make a PR in order to support both client and server side implementations
Expected behavior
The error doesn't happen
Information
Tiny-Swiper Version: v2.2.0
OS: Every
Browser: Every
Reproduce example:I haven't any, only screen shots
Describe the bug Since the last version (
2.2.0
), our implementation (with server side rendering) returns the following error:Checking nextTick.ts, I noticed that
nextFrame
andcancelNextFrame
constants are defined outsideTick()
. Of course,Tick
is never executed on the server. Now that those connstants are defined at file scope, this bug can see the light.I'll make a PR in order to support both client and server side implementations
Expected behavior The error doesn't happen
Information