mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
FIX: cleaner error handling for multiple autocomplete matchers
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user