From ff6cd928410c93e0d2a61c8e947270e444c7aac6 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 7 Aug 2015 15:26:45 -0400 Subject: [PATCH] Fix NPE --- static/js/directives/ui/header-bar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/directives/ui/header-bar.js b/static/js/directives/ui/header-bar.js index 1162ef240..0d96aa2a6 100644 --- a/static/js/directives/ui/header-bar.js +++ b/static/js/directives/ui/header-bar.js @@ -90,7 +90,7 @@ angular.module('quay').directive('headerBar', function () { DocumentationService.findDocumentation($scope, query.split(' '), function(results) { if (!$scope.searchVisible) { return; } - var currentResults = $scope.searchResultState['results']; + var currentResults = $scope.searchResultState['results'] || []; results.forEach(function(result) { if (currentResults.length < documentSearchMaxResults) { currentResults.push(result);