Skip to content

React, carousel not working with fetched images #81

Closed
@misshu1

Description

I'm not able to use the carousel with photos fetched from outside my project.
Getting the following error:

scrollTarget.ts:41 Uncaught TypeError: Cannot read property 'index' of undefined
    at findTargetSnap (scrollTarget.ts:41)
    at Object.byDistance (scrollTarget.ts:73)
    at allowedForce (dragHandler.ts:106)
    at HTMLDocument.up (dragHandler.ts:167)

To make the carousel work I have to do a workaround like

{images.length !== 0 && (
    <Carousel images={images} />
)}

I don't think that's normal.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreactIssue is related to ReactresolvedThis issue is resolved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions