fix for #4969, can't call trim of undefined

This commit is contained in:
jaredevantabor 2017-01-27 15:21:33 -08:00
parent 06e7bd01a7
commit c6d799f481

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