lvhao 1 dzień temu
rodzic
commit
d504923b5c
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      template/erp/whlabel_print.html

+ 5 - 2
template/erp/whlabel_print.html

@@ -587,8 +587,11 @@ $(document).keyup(function(event){
 		$(".setting .select").each(function() {
 		    
             if ($(this).hasClass('select_two')) {
-                $(this).select2("destroy");
-                $(this).find("option[value='"+data[i]+"']").prop("selected","selected");
+                if($(this).find("option[value='"+data[i]+"']")){
+                    $(this).select2("destroy");
+                    $(this).find("option[value='"+data[i]+"']").prop("selected","selected");
+                }
+               
             }else{
                 $(this).find("option[value='"+data[i]+"']").prop("selected","selected");
             }