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);