flickity icon indicating copy to clipboard operation
flickity copied to clipboard

Maximum call stack size exceeded error when using asNavFor

Open varshinily opened this issue 2 years ago • 0 comments

Using the asNavFor option in a project to sync two slideshows. However, I'm getting the following error in console:

flickity.pkgd.min.js?v=114460508543641870001653010526:17 Uncaught RangeError: Maximum call stack size exceeded
    at n.s.unselect (flickity.pkgd.min.js?v=114460508543641870001653010526:17:6268)
    at flickity.pkgd.min.js?v=114460508543641870001653010526:17:7572
    at Array.forEach (<anonymous>)
    at e.i.unselect (flickity.pkgd.min.js?v=114460508543641870001653010526:17:7550)
    at p.v.unselectSelectedSlide (flickity.pkgd.min.js?v=114460508543641870001653010526:17:18433)
    at p.v.updateSelectedSlide (flickity.pkgd.min.js?v=114460508543641870001653010526:17:18155)
    at p.v.select (flickity.pkgd.min.js?v=114460508543641870001653010526:17:17293)
    at p.v.selectCell (flickity.pkgd.min.js?v=114460508543641870001653010526:17:18844)
    at p.e.navCompanionSelect (flickity.pkgd.min.js?v=114460508543641870001653010526:45:1180)
    at p.onNavCompanionSelect (flickity.pkgd.min.js?v=114460508543641870001653010526:45:808) 

Came across a similar issue where it was suggested to use flickity-sync.js with the sync option, that is not mentioned in the Flickity documentation. This then gives me the following error:

flickity-sync.js?v=69011861590419305831653013599:28 Uncaught TypeError: Cannot set properties of undefined (setting 'sync')
    at factory (flickity-sync.js?v=69011861590419305831653013599:28:22)
    at flickity-sync.js?v=69011861590419305831653013599:16:5
    at flickity-sync.js?v=69011861590419305831653013599:22:2

Test case using asNavFor: https://codepen.io/varshini-nanthakumar/pen/JjpJYbY

varshinily avatar May 20 '22 03:05 varshinily