Contribution Date
              Technology
              
          Contribution Project
              
          Contribution Details
              I reviewed the patch and here are some suggestions:
+++ b/js/autocomplete.js
@@ -133,6 +133,9 @@
+        var minLength = (settings.linkitMinLength) ? settings.linkitMinLength : 1;
+        autocomplete.options.minLength = minLength;
Remove these and rather let's initialize 'minlength' in the autocomplete object itself. We can do so by adding drupalSettings in the JS file as followed:
- Replace first line of JS 
(function ($, Drupal, _, document) {with(function ($, Drupal, _, document, drupalSettings) { - Replace last line of JS 
})(jQuery, Drupal, _, document);with})(jQuery, Drupal, _, document, drupalSettings); - The 
minlength: 1will becomeminLength: (drupalSettings.linkitMinLength) ? drupalSettings.linkitMinLength : 1 
Contribution Issue Link
              
          Contribution Link
              
          Files count
              0
          Patches count
              0