Skip to content

Commit

Permalink
minor: fix coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiaone committed Feb 22, 2022
1 parent d4a8985 commit 7876703
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web/src/components/nav/head-nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export default {
if (project?.permission?.view_business) {
return true;
}
this.$store.commit('updateProject', project.project_id);
this.$store.commit('updateProject', project?.project_id);
this.$store.dispatch('getApplyData', {
action_ids: ['view_business'],
resources: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default {
if (item.bk_obj_id === 'module' && !dict[item.bk_inst_name]) {
dict[item.bk_inst_name] = item;
}
if (item?.children?.length) {
if (item.children?.length) {
this.filterList(item.children, dict);
}
});
Expand Down Expand Up @@ -203,7 +203,7 @@ export default {
}
}

if (treeNode?.children?.length) {
if (treeNode.children?.length) {
this.recursiveFindDefault(
treeNode.children,
treeNode,
Expand Down Expand Up @@ -231,7 +231,7 @@ export default {
nodes.forEach((node) => {
node.checked = bool;
node.disabled = bool;
node?.children?.length && this.inheritCheckNode(node.children, bool);
node?.children.length && this.inheritCheckNode(node.children, bool);
});
},
// 遍历树找到勾选的节点,如果父节点已勾选,子孙节点不算在列表内
Expand All @@ -244,7 +244,7 @@ export default {
bk_obj_id: data.bk_obj_id,
bk_biz_id: data.bk_biz_id,
});
} else if (node?.children?.length) {
} else if (node.children?.length) {
node.children.forEach((child) => {
this.recursiveFindTopoNodes(child, selectedTopoList);
});
Expand Down

0 comments on commit 7876703

Please sign in to comment.