Permalink
Browse files

handle js error in autocomplete

  • Loading branch information...
r888888888 committed Oct 18, 2017
1 parent 83bfe3e commit da7cdcccfab896a78fa0c6673579c70e9a03a478
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/assets/javascripts/autocomplete.js
@@ -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) {

0 comments on commit da7cdcc

Please sign in to comment.