Avoids making empty query

This commit is contained in:
2016-01-26 12:43:30 +01:00
parent eaf2d2cf0c
commit 8c17711dfa

View File

@@ -22,8 +22,10 @@ angular.module('satbd.satellite.bar').controller('GlobalCtrl', function($scope,$
};
$scope.$on('onSearchQuery', function(event,query) {
$scope.location='search';
$scope.$broadcast('displaySearch', query)
if (query.length > 0) {
$scope.location='search';
$scope.$broadcast('displaySearch', query)
}
});
$scope.$on('recentsReady', function(event) {