viktorlarsson / vue-tiny-slider

Vanilla javascript slider for all purposes created by ganlanyuan in Vue.
MIT License
136 stars 51 forks source link

[Bug] Slider causes errors on resize when used inside keep-alive #68

Open AndrewBogdanovTSS opened 3 years ago

AndrewBogdanovTSS commented 3 years ago

I was able to get this error when using Nuxt page level keep-alive prop, but I get it's also reproducible with a regular vue router.

How to reproduce:

  1. Create an instance of vue-tiny-slider with keep-alive enabled
  2. Change route by navigating to another page
  3. Try to resize the page

AR: https://take.ms/KhftN

Uncaught TypeError: Cannot read property 'appendChild' of null

ER Accessing any document level methods should be safe. If document is not available appenChild should not be executed

rizalrenaldi commented 2 years ago

Does anyone have a solution to this issue?