diff --git a/select2.js b/select2.js index 44d0e924..0840fb90 100755 --- a/select2.js +++ b/select2.js @@ -2361,7 +2361,7 @@ return markup.join(""); }, formatSelection: function (data, container) { - return data.text; + return data ? data.text : undefined; }, formatResultCssClass: function(data) {return undefined;}, formatNoMatches: function () { return "No matches found"; },