Browse Source

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

Igor Vaynberg 13 years ago
parent
commit
09d7a2de6e
1 changed files with 1 additions and 1 deletions
  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();