a better way to deal with js errors in autocomplete plugins if the object is not available

This commit is contained in:
Mario Vavti
2018-04-26 15:40:59 +02:00
parent 9431785466
commit 63c76eae0c
2 changed files with 20 additions and 2 deletions

View File

@@ -1,5 +1,4 @@
$(document).ready(function() {
if($("#search-text").length)
$("#search-text").contact_autocomplete(baseurl + '/search_ac','',true);
$("#search-text").contact_autocomplete(baseurl + '/search_ac','',true);
});