Famous / Famous/lesson-carousel-starter-kit

Dots.js: onSizeChange returns single value, not array

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
6
Forks
16
PR merge metrics
No merged PRs in 30d

Description

all steps after 5 throw this error: Uncaught TypeError: Cannot read property '0' of undefined.

this is because the (Dots.js line 31) onSizeChange function's size argument has a single value (for the x axis) instead of an array. the size variable is then used as an array on line 46.

bug can be fixed by changing line 46 to use "this.size" instead of "this.size[0]"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.