Explorar o código

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

Igor Vaynberg %!s(int64=13) %!d(string=hai) anos
pai
achega
09d7a2de6e
Modificáronse 1 ficheiros con 1 adicións e 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();