diff --git a/static/js/controllers.js b/static/js/controllers.js index c3b58cc1c..7a6e8bd4b 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -270,7 +270,7 @@ function LandingCtrl($scope, $timeout, Restangular, UserService, KeyService) { browserchrome.update(); } -function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location) { +function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location, $timeout) { $rootScope.title = 'Loading...'; // Watch for changes to the tag parameter. @@ -329,7 +329,9 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location) { $scope.$watch('repo', function() { if ($scope.tree) { - $scope.tree.notifyResized(); + $timeout(function() { + $scope.tree.notifyResized(); + }); } });