Merge pull request #5082 from jaredevantabor/smart-search

fix for #4969, can't call trim of undefined
This commit is contained in:
Jared Tabor 2017-01-31 22:37:15 -08:00 committed by GitHub
commit e9f22be216

View File

@ -201,7 +201,7 @@ export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', '
origQueryset = _.clone(queryset);
// Remove leading/trailing whitespace if there is any
terms = terms.trim();
terms = (terms) ? terms.trim() : "";
if(terms && terms !== '') {
// Split the terms up