Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

[Carousel] TypeError: Cannot read property 'index' of undefined #3755

@sylvainbx

Description

@sylvainbx

In carousel.js#L76, if slides.length == 0, newIndex will be NaN.
This will cause function getSlideByIndex(index) to throw an error on L52 :

TypeError: Cannot read property 'index' of undefined
    at getSlideByIndex (ui-bootstrap-tpls.js?body=1:363)
    at Scope.$scope.next (ui-bootstrap-tpls.js?body=1:391)
    at timerFn (ui-bootstrap-tpls.js?body=1:429)
    at angular.js?body=1:13331
    at Scope.$eval (angular.js?body=1:14467)
    at Scope.$digest (angular.js?body=1:14283)
    at Scope.$apply (angular.js?body=1:14572)
    at tick (angular.js?body=1:10429)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions