(js) Fix variable verification in sgSearch

pull/105/head
Francis Lachapelle 2015-09-16 14:26:24 -04:00
parent 11d9765a69
commit 7b580f8af6
1 changed files with 1 additions and 1 deletions

View File

@ -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