Explorar el Código

Merge branch 'master' of git://github.com/ivaynberg/select2

Igor Vaynberg hace 13 años
padre
commit
09d7a2de6e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1018,7 +1018,7 @@
                 this.updateSelection(data);
             } else {
                 // val is an object
-                this.opts.element.val((val === null) ? "" : val.id);
+                this.opts.element.val((val === null || val === "") ? "" : val.id);
                 this.updateSelection(val);
             }
             this.setPlaceholder();