瀏覽代碼

remove unnecessary code

Igor Vaynberg 12 年之前
父節點
當前提交
87e62004f6
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      select2.js

+ 1 - 3
select2.js

@@ -1571,9 +1571,7 @@ the specific language governing permissions and limitations under the Apache Lic
                 }
 
                 if (data.results.length === 0 && checkFormatter(opts.formatNoMatches, "formatNoMatches")) {
-                    if (results.find(".select2-no-results").length === 0) {
-                        render("<li class='select2-no-results'>" + opts.formatNoMatches(search.val()) + "</li>");
-                    }
+                    render("<li class='select2-no-results'>" + opts.formatNoMatches(search.val()) + "</li>");
                     return;
                 }