Explorar o código

append label only when formatted is not undefined

Richard Huang %!s(int64=11) %!d(string=hai) anos
pai
achega
701e84ea21
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      select2.js

+ 1 - 1
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) {