From fde898aa1f8f05a672ca523a887cc6d8217ca737 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 14 Jun 2013 16:15:14 -0900 Subject: [PATCH] Do not display empty changes --- js/controllers.js | 4 ++++ partials/container.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/controllers.js b/js/controllers.js index 46a2628f2..8b6db4ef3 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -141,6 +141,10 @@ function ContainerController($scope, $routeParams, $location, Container) { $scope.changes = []; + $scope.hasContent = function(data) { + return data !== null && data !== undefined && data.length > 1; + }; + $scope.getChanges = function() { Container.changes({id: $routeParams.id}, function(d) { $scope.changes = d; diff --git a/partials/container.html b/partials/container.html index ddbed3b87..ec230cbc4 100644 --- a/partials/container.html +++ b/partials/container.html @@ -52,7 +52,7 @@