handle js error in autocomplete

This commit is contained in:
r888888888
2017-10-18 14:45:37 -07:00
parent 83bfe3ee10
commit da7cdcccfa

View File

@@ -122,7 +122,12 @@
return;
}
var term = before_caret_text.match(/\S+/g).pop();
var term = before_caret_text.match(/\S+/g);
if (!term) {
return;
}
term = term.pop();
var regexp = new RegExp("^(?:" + prefixes + ")(.*)$", "i");
var match = term.match(regexp);
if (match) {