Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(tabs): pagination only call watcher() when it's a function
Browse files Browse the repository at this point in the history
Fix for #1072. Closes #1073.
  • Loading branch information
e-oz authored and ThomasBurleson committed Jan 8, 2015
1 parent 84a6c14 commit e952ab4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/tabs/js/paginationDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ function TabPaginationDirective($mdConstant, $window, $$rAF, $$q, $timeout, $mdM
function () {
$timeout(function () {
if (element[0].offsetParent) {
watcher();
if (angular.isFunction(watcher)) {
watcher();
}
debouncedUpdatePagination();
watcher = null;
}
Expand Down

0 comments on commit e952ab4

Please sign in to comment.