mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-03 22:22:19 +00:00
(js) Fix possible errors (help from jsjint)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
|
||||
(function() {
|
||||
/* jshint validthis: true */
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
@@ -66,7 +67,7 @@
|
||||
if (buttonEl && compiledButtonEl) {
|
||||
compiledButtonEl.on('click', controller.cancelSearch);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +84,7 @@
|
||||
transclude(function(clone) {
|
||||
iElement.append(clone);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,9 +110,9 @@
|
||||
|
||||
// Method to call on data changes
|
||||
vm.onChange = function() {
|
||||
if (vm.searchText != null) {
|
||||
if (vm.searchText !== null) {
|
||||
if (vm.searchText != vm.previous.searchText || vm.searchField != vm.previous.searchField) {
|
||||
if (vm.searchText.length > 2 || vm.searchText.length == 0) {
|
||||
if (vm.searchText.length > 2 || vm.searchText.length === 0) {
|
||||
// doSearch is the compiled expression of the sg-search attribute
|
||||
vm.doSearch($scope, { searchText: vm.searchText, searchField: vm.searchField });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user