Skip to content

Commit

Permalink
Log the related element if the ScrollerProvider couldn’t find any chi…
Browse files Browse the repository at this point in the history
…ldren during load.
  • Loading branch information
paales committed Jan 22, 2024
1 parent b3faac6 commit dc86f2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/stupid-carrots-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphcommerce/framer-scroller": patch
---

Log the related element if the ScrollerProvider couldn’t find any children during load.
2 changes: 1 addition & 1 deletion packages/framer-scroller/components/ScrollerProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function ScrollerProvider(props: ScrollerProviderProps) {
(children: React.ReactNode) => {
const count = React.Children.count(children)
if (!count && process.env.NODE_ENV !== 'production')
console.warn('[@graphcommerce/framer-scroller]: Can not find children')
console.warn('[@graphcommerce/framer-scroller]: Can not find children', scrollerRef.current)

const itemsArr: unknown[] = items.get().slice()
itemsArr.length = count
Expand Down

0 comments on commit dc86f2f

Please sign in to comment.