소스 검색

tree根据Id和Name选中指定节点增加空判断

Ricky 4 년 전
부모
커밋
082b5d70b1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

+ 1 - 1
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@@ -1345,7 +1345,7 @@ var table = {
             },
             // 根据Id和Name选中指定节点
             selectByIdName: function(treeId, node) {
-        		if ($.common.isNotEmpty(treeId) && treeId == node.id) {
+        		if ($.common.isNotEmpty(treeId) && node && treeId == node.id) {
         			$._tree.selectNode(node, true);
         		}
             },