radix-vue / shadcn-vue

Vue port of shadcn-ui

Home Page:https://www.shadcn-vue.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Carousel - Cannot read properties of undefined (reading 'canScrollNext')

Artemiy111 opened this issue · comments

Reproduction

Write <Carousel :opts="{ active: false }"></Carousel>

Describe the bug

api is undefined if active is set to false

Also may be empla-carousel-vue type definition issue, because it not specifies that CarouselApi can be undefined

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 9 5900HS with Radeon Graphics
    Memory: 2.88 GB / 15.41 GB
  Binaries:
    Node: 21.5.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.2.0 - C:\Program Files\nodejs\pnpm.CMD
    bun: 1.1.3 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (125.0.2535.92)
    Internet Explorer: 11.0.22621.3527

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests