Fix NPE
This commit is contained in:
parent
fc74b9569b
commit
ff6cd92841
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ angular.module('quay').directive('headerBar', function () {
|
||||||
DocumentationService.findDocumentation($scope, query.split(' '), function(results) {
|
DocumentationService.findDocumentation($scope, query.split(' '), function(results) {
|
||||||
if (!$scope.searchVisible) { return; }
|
if (!$scope.searchVisible) { return; }
|
||||||
|
|
||||||
var currentResults = $scope.searchResultState['results'];
|
var currentResults = $scope.searchResultState['results'] || [];
|
||||||
results.forEach(function(result) {
|
results.forEach(function(result) {
|
||||||
if (currentResults.length < documentSearchMaxResults) {
|
if (currentResults.length < documentSearchMaxResults) {
|
||||||
currentResults.push(result);
|
currentResults.push(result);
|
||||||
|
|
Reference in a new issue