修复:加工组查看器可能触发的bug

pull/1071/head
ChenX 4 years ago
parent 59b7fb9339
commit 34ab5452fa

@ -248,9 +248,7 @@ export class ProcessingGroupModal extends React.Component<{ store: ProcessingGro
}
}
for (let g of removepg)
{
this.DelGroup(g);
}
}
//添加
for (let c of selectedLeftNodeSet)
@ -346,7 +344,7 @@ export class ProcessingGroupModal extends React.Component<{ store: ProcessingGro
let childs: ITreeNode[] = []; //板件(实体)节点
for (let obj of g.Objects)
{
if (obj.IsErase)
if (!obj || obj.IsErase)
continue;
let childnode: ITreeNode;
//查看/添加
@ -579,7 +577,7 @@ export class ProcessingGroupModal extends React.Component<{ store: ProcessingGro
DelGroup = (g: ProcessingGroupRecord) =>
{
for (let objID of g.Objects)
if (objID.Object instanceof Board)
if (objID?.Object && objID.Object instanceof Board)
arrayRemove(objID.Object.ProcessingGroupList, g.Id);
g.Objects.length = 0;
g.Erase();
@ -665,7 +663,7 @@ export class ProcessingGroupModal extends React.Component<{ store: ProcessingGro
if (g.Name === c)
for (let obj of g.Objects)
{
if (obj.IsErase || !(obj.Object instanceof Entity))
if (!obj || obj.IsErase || !(obj.Object instanceof Entity))
continue;
if (this.props.store.flag && !(this.props.store.checkEnts.includes(obj.Object)))
continue;

Loading…
Cancel
Save