Преглед на файлове

Method called using apply to avoid translating multiple args into single arg. Fixes #3756

Chris Rodgers преди 9 години
родител
ревизия
441fbc2d73
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/js/jquery.select2.js

+ 1 - 1
src/js/jquery.select2.js

@@ -35,7 +35,7 @@ define([
 
         var args = Array.prototype.slice.call(arguments, 1);
 
-        var ret = instance[options](args);
+        var ret = instance[options].apply(instance, args);
 
         // Check if we should be returning `this`
         if ($.inArray(options, thisMethods) > -1) {