Browse Source

Merge pull request #1733 from flyerhzm/append-label-only-when-formatted-defined

append label only when formatted is not undefined
Kevin Brown 11 years ago
parent
commit
0f1372ce72
1 changed files with 1 additions and 1 deletions
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -905,9 +905,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) {