From 701e84ea213c91f0faf6f9d8f313fef2310c88eb Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Thu, 19 Sep 2013 11:19:10 +0800 Subject: [PATCH] append label only when formatted is not undefined --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 950f9d73..e8ccd62f 100644 --- a/select2.js +++ b/select2.js @@ -883,9 +883,9 @@ the specific language governing permissions and limitations under the Apache Lic formatted=opts.formatResult(result, label, query, self.opts.escapeMarkup); if (formatted!==undefined) { label.html(formatted); + node.append(label); } - node.append(label); if (compound) {