diff --git a/static/js/pages/repo-view.js b/static/js/pages/repo-view.js index 7cb8ed365..69f4b6af0 100644 --- a/static/js/pages/repo-view.js +++ b/static/js/pages/repo-view.js @@ -148,11 +148,11 @@ // Watch for changes to the repository. $scope.$watch('repo', function() { - if ($scope.tree) { - $timeout(function() { + $timeout(function() { + if ($scope.tree) { $scope.tree.notifyResized(); - }); - } + } + }); }); // Watch for changes to the tag parameter.