Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 3e7ff23

Browse files
fix(tabs): prevents error on empty tab list
Closes #3264
1 parent 0c66974 commit 3e7ff23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/tabs/js/tabsController.js

+1
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ function MdTabsController ($scope, $element, $window, $timeout, $mdConstant, $md
478478
* Forces the pagination to move the focused tab into view.
479479
*/
480480
function adjustOffset (index) {
481+
if (!elements.tabs[index]) return;
481482
if (ctrl.shouldCenterTabs) return;
482483
if (index == null) index = ctrl.focusIndex;
483484
var tab = elements.tabs[index],

0 commit comments

Comments
 (0)