From 441fbc2d737367e6ea157dcd74fe4c841d04c870 Mon Sep 17 00:00:00 2001 From: Chris Rodgers Date: Thu, 10 Sep 2015 12:05:25 +0100 Subject: [PATCH] Method called using apply to avoid translating multiple args into single arg. Fixes #3756 --- src/js/jquery.select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/jquery.select2.js b/src/js/jquery.select2.js index 01433d9e..4aeb22b8 100644 --- a/src/js/jquery.select2.js +++ b/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) {