Bladeren bron

Explicitly require jquery-mousewheel now

This fixes the implicit requirement of jquery-mousewheel that previously
existed. This was not allowed, as pointed out in
https://github.com/select2/select2/issues/3287#issuecomment-120408092

Now the requirement is more explicit, so everything should work as it
was before.
Kevin Brown 9 jaren geleden
bovenliggende
commit
32b6eae54b
1 gewijzigde bestanden met toevoegingen van 2 en 5 verwijderingen
  1. 2 5
      src/js/jquery.select2.js

+ 2 - 5
src/js/jquery.select2.js

@@ -1,13 +1,10 @@
 define([
   'jquery',
-  'require',
+  'jquery-mousewheel',
 
   './select2/core',
   './select2/defaults'
-], function ($, require, Select2, Defaults) {
-  // Force jQuery.mousewheel to be loaded if it hasn't already
-  require('jquery.mousewheel');
-
+], function ($, _, Select2, Defaults) {
   if ($.fn.select2 == null) {
     // All methods that should return the element
     var thisMethods = ['open', 'close', 'destroy'];