Browse Source

Recursively apply defaults

This closes https://github.com/select2/select2/pull/4130.
Bruno Sampaio 9 years ago
parent
commit
983cd8e765
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/js/select2/defaults.js

+ 1 - 1
src/js/select2/defaults.js

@@ -55,7 +55,7 @@ define([
   }
   }
 
 
   Defaults.prototype.apply = function (options) {
   Defaults.prototype.apply = function (options) {
-    options = $.extend({}, this.defaults, options);
+    options = $.extend(true, {}, this.defaults, options);
 
 
     if (options.dataAdapter == null) {
     if (options.dataAdapter == null) {
       if (options.ajax != null) {
       if (options.ajax != null) {