소스 검색

Merge pull request #3757 from christophano/master

Use apply when calling methods
Kevin Brown 9 년 전
부모
커밋
4b5743f22e
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) {