metafizzy / metafizzy/flickity
Getting an error on desktop view
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.6k
- Forks
- 593
- PR merge metrics
- No merged PRs in 30d
Description
Hi everyone!
I have the great Flickity on my website.
I want to show the carousel on mobile only and I used the SASS as described in the documentation
.productSlider:after //Show slider on mobile only
content: ''
display: none
@include bp(oneColumn)
content: 'flickity'
Everything works well beside I get an error on the flickity JS: TypeError: undefined is not an object (evaluating 't.forEach')
This is the page URL: https://www.mattiacompagnucci.com/shop/wandering-through-life-istanbul
The error blocks also other JS.
I hope you can help me solving this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the error on the linked product page and reviewing the Sass mobile-only initialization snippet alongside the Flickity JavaScript setup. Trace why the desktop view reaches the failing `t.forEach` call, then verify that the carousel behaves correctly on mobile and no longer blocks other JavaScript.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sass
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100