Parcourir la source

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

Igor Vaynberg il y a 13 ans
Parent
commit
09d7a2de6e
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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();