egjs-flicking icon indicating copy to clipboard operation
egjs-flicking copied to clipboard

Error when using `moveTo` method: "Index '0' is out of range"

Open yeonjaee opened this issue 5 months ago • 2 comments

Description

When using the moveTo method in ngx-flicking to move to a panel at a given index, an error occurs. The method is called with the index of the panel as its argument, but the following error message is thrown:

Error: Uncaught (in promise): FlickingError: Index "0" is out of range: should be between 0 and -1.
FlickingError: Index "0" is out of range: should be between 0 and -1. at new FlickingError (FlickingError.ts:34:5)

The NgxFlickingComponent is properly initialized, and the indexes of the flicking-panels are being passed correctly. It works as expected, but an error message is still occurring.

Steps to check or reproduce

https://stackblitz.com/edit/stackblitz-starters-edv3e7?file=src%2Fmain.ts

Here is the link. Please check the error messages logged in the devTools console.

Thank you.

yeonjaee avatar Sep 02 '24 01:09 yeonjaee