FIX: cleaner error handling for multiple autocomplete matchers
This commit is contained in:
parent
8d1da9cedd
commit
6d22354ac3
|
@ -59,7 +59,13 @@ export default function(options) {
|
|||
}
|
||||
|
||||
if (this.length !== 1) {
|
||||
alert("only supporting one matcher at the moment");
|
||||
if (window.console) {
|
||||
window.console.log("WARNING: passed multiple elements to $.autocomplete, skipping.");
|
||||
if (window.Error) {
|
||||
window.console.log((new window.Error()).stack);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
var disabled = options && options.disabled;
|
||||
|
|
Loading…
Reference in New Issue