From b724abb68415946797f95462f5d838d0a49633aa Mon Sep 17 00:00:00 2001 From: jaredevantabor Date: Wed, 22 Feb 2017 13:11:20 -0800 Subject: [PATCH] adding a check to prevent a console error due to null pointer --- .../client/src/shared/smart-search/smart-search.controller.js | 4 +++- 1 file changed, 3 insertions(+), 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 41b4071db2..d3b1d216f1 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 @@ -12,7 +12,9 @@ export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', ' else { // steps through the current tree of $state configurations, grabs default search params defaults = _.find($state.$current.path, (step) => { - return step.params.hasOwnProperty(`${$scope.iterator}_search`); + if(step && step.params && step.params.hasOwnProperty(`${$scope.iterator}_search`)){ + return step.params.hasOwnProperty(`${$scope.iterator}_search`); + } }).params[`${$scope.iterator}_search`].config.value; }