From a7ff08458dd96a14a1ca1f38713dc67ee496af95 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 8 Sep 2016 14:32:49 -0400 Subject: [PATCH] Fix small NPE Fixes #1811 --- static/js/core-ui.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/static/js/core-ui.js b/static/js/core-ui.js index f7457ce0a..a1395bf1f 100644 --- a/static/js/core-ui.js +++ b/static/js/core-ui.js @@ -676,13 +676,17 @@ angular.module("core-ui", []) $scope.toggleItems = function($event) { $event.stopPropagation(); - $scope.controller.toggleItems(); + if ($scope.controller) { + $scope.controller.toggleItems(); + } }; this.checkByFilter = function(filter) { - $scope.controller.checkByFilter(function(item) { - return filter({'item': item}); - }); + if ($scope.controller) { + $scope.controller.checkByFilter(function(item) { + return filter({'item': item}); + }); + } }; } };