From 7b580f8af65525b95d56b2f2cd6a1933d7d16998 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 16 Sep 2015 14:26:24 -0400 Subject: [PATCH] (js) Fix variable verification in sgSearch --- UI/WebServerResources/js/Common/sgSearch.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/WebServerResources/js/Common/sgSearch.directive.js b/UI/WebServerResources/js/Common/sgSearch.directive.js index 2d0cdc273..855fa84dd 100644 --- a/UI/WebServerResources/js/Common/sgSearch.directive.js +++ b/UI/WebServerResources/js/Common/sgSearch.directive.js @@ -110,7 +110,7 @@ // Method to call on data changes vm.onChange = function() { - if (vm.searchText !== null) { + if (typeof vm.searchText !== 'undefined' && vm.searchText !== null) { if (vm.searchText != vm.previous.searchText || vm.searchField != vm.previous.searchField) { if (vm.searchText.length > 2 || vm.searchText.length === 0) { // doSearch is the compiled expression of the sg-search attribute