Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property '1' of undefined in updateInnerCollection #43

Closed
Raidok opened this issue May 14, 2015 · 2 comments · Fixed by #44
Closed

Cannot read property '1' of undefined in updateInnerCollection #43

Raidok opened this issue May 14, 2015 · 2 comments · Fixed by #44

Comments

@Raidok
Copy link

Raidok commented May 14, 2015

I was looking for a library to make a horizontally scrollable box automatically scroll the active element into view and this here seemed like a great candidate for this task. Unfortunately I cannot seem to get it working.

See Plunker

The following error is logged when opening the page and similar ones when navigating with the buttons below the scrollable area:

TypeError: Cannot read property '1' of undefined
    at updateInnerCollection (angular-vs-repeat.js:454)
    at reinitialize (angular-vs-repeat.js:334)
    at Object.fn (angular-vs-repeat.js:153)
    at n.$digest (angular.js:14308)
    at n.$apply (angular.js:14571)
    at HTMLAnchorElement.<anonymous> (angular.js:21571)
    at HTMLAnchorElement.c (angular.js:3032)

I am using the latest version from the master branch (f57eaa1).

It seems like it fails due to the $scope.sizesCumulative and/or $scope.sizes fields do not exists and I cannot seem to figure out why or how can I get them to work.

This seems to be a fairly new functionality and there aren't any examples around yet so maybe somebody can tell me where have I gone wrong?

Thanks!

Raido

@kamilkp
Copy link
Owner

kamilkp commented May 15, 2015

This is a but in vs-scroll-settings functionality. Without it it works fine. I wrote about this but in the #32 PR conversation. Maybe the author know how to fix it fast.

@margru
Copy link
Contributor

margru commented May 15, 2015

Fixed in #44. See plunker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants