kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.34k stars 5.88k forks source link

Maximum call stack size exceede #4092

Open KVPV opened 3 years ago

KVPV commented 3 years ago
Query.Deferred exception: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded
    at String.replace (<anonymous>)
    at Function.oe [as find] (https://code.jquery.com/jquery-3.3.1.min.js:2:6812)
    at w.fn.init.find (https://code.jquery.com/jquery-3.3.1.min.js:2:24400)
    at new w.fn.init (https://code.jquery.com/jquery-3.3.1.min.js:2:24889)
    at w (https://code.jquery.com/jquery-3.3.1.min.js:2:896)
    at Slick.cleanUpEvents (https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js:805:9)
    at Slick.destroy (https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js:852:11)
    at Slick.refresh (https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js:1840:11)
    at Slick.checkResponsive (https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js:670:23)
    at Slick.init (https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js:1278:15) undefined
w.Deferred.exceptionHook @ jquery-3.3.1.min.js:2
c                        @ jquery-3.3.1.min.js:2
setTimeout (async)
(anonymous)              @ jquery-3.3.1.min.js:2
u                        @ jquery-3.3.1.min.js:2
fireWith                 @ jquery-3.3.1.min.js:2
fire                     @ jquery-3.3.1.min.js:2
u                        @ jquery-3.3.1.min.js:2
fireWith                 @ jquery-3.3.1.min.js:2
ready                    @ jquery-3.3.1.min.js:2
_                        @ jquery-3.3.1.min.js:2

Code initialization slick:

$('.cases .slider').slick({
      infinite: true,
      slidesToShow: 8,
      slidesToScroll: 1,
      responsive: [
        {
          breakpoint: 768,
          settings: {
            slidesToShow: 4,
            slidesToScroll: 4
          }
        },
        {
          breakpoint: 425,
          settings: {
            slidesToShow: 2,
            slidesToScroll: 1
          }
        }
      ]
    });

I have 8 blocks on site. This problem occurs when I open the Chrome developer panel, trying to test the responsive screen (e.g. resizing the screen). From the console, is creating some kind of timer that runs every millisecond.

LucasNevesAraujo commented 1 year ago

You can check https://github.com/kenwheeler/slick/issues/3447#issuecomment-418137468, it worked for me.