1
0
mirror of synced 2025-03-10 22:56:12 +03:00

copy the args object so changes to it no longer effect other select2s. closes #47

This commit is contained in:
Igor Vaynberg 2012-04-27 22:39:40 -07:00
parent 3b9840e3ff
commit e0f854d667

View File

@ -1417,7 +1417,7 @@
this.each(function () {
if (args.length === 0 || typeof(args[0]) === "object") {
opts = args.length === 0 ? {} : args[0];
opts = args.length === 0 ? {} : $.extend({}, args[0]);
opts.element = $(this);
if (opts.element.get(0).tagName.toLowerCase() === "select") {