From c6d799f48189aa25092addae3d709e2570bcbeff Mon Sep 17 00:00:00 2001 From: jaredevantabor Date: Fri, 27 Jan 2017 15:21:33 -0800 Subject: [PATCH] fix for #4969, can't call trim of undefined --- .../client/src/shared/smart-search/smart-search.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/src/shared/smart-search/smart-search.controller.js b/awx/ui/client/src/shared/smart-search/smart-search.controller.js index 5d60842674..22a91ec61a 100644 --- a/awx/ui/client/src/shared/smart-search/smart-search.controller.js +++ b/awx/ui/client/src/shared/smart-search/smart-search.controller.js @@ -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