copy the args object so changes to it no longer effect other select2s. closes #47
This commit is contained in:
parent
3b9840e3ff
commit
e0f854d667
@ -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") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user