From d714c00ddb814e96e9e685bd45e4e91aecfb62c5 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 20 Apr 2015 12:01:17 -0400 Subject: [PATCH] Fix NPE --- static/js/pages/repo-view.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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.