This closes https://github.com/select2/select2/pull/4130.
@@ -55,7 +55,7 @@ define([
}
Defaults.prototype.apply = function (options) {
- options = $.extend({}, this.defaults, options);
+ options = $.extend(true, {}, this.defaults, options);
if (options.dataAdapter == null) {
if (options.ajax != null) {