Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with nextTick.ts & SSR #77

Open
josemrodrigu opened this issue Feb 11, 2022 · 3 comments
Open

Issues with nextTick.ts & SSR #77

josemrodrigu opened this issue Feb 11, 2022 · 3 comments

Comments

@josemrodrigu
Copy link
Contributor

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

Captura de Pantalla 2022-02-11 a la(s) 12 27 10

Captura de Pantalla 2022-02-11 a la(s) 12 27 18

@josemrodrigu
Copy link
Contributor Author

@joe223 Any updates on this issue? do yo have a better solution for this scenario?

Thanks!

@themrdanielvp
Copy link

I am also having this issue..

@shkipan
Copy link

shkipan commented Apr 10, 2024

@joe223 , is there any chance this issue will be solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants