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

Commit

Permalink
fix(tabs): prevents error on empty tab list
Browse files Browse the repository at this point in the history
Closes #3264
  • Loading branch information
robertmesserle committed Jun 17, 2015
1 parent 0c66974 commit 3e7ff23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/tabs/js/tabsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ function MdTabsController ($scope, $element, $window, $timeout, $mdConstant, $md
* Forces the pagination to move the focused tab into view.
*/
function adjustOffset (index) {
if (!elements.tabs[index]) return;
if (ctrl.shouldCenterTabs) return;
if (index == null) index = ctrl.focusIndex;
var tab = elements.tabs[index],
Expand Down

0 comments on commit 3e7ff23

Please sign in to comment.