|
@@ -567,12 +567,17 @@ export const onlyVisible2 = (xml: string, partIndexs: Array<any>, resourceType?:
|
|
|
|
|
|
}
|
|
|
const visiblePartInfo = partList[partIndexs[0]];
|
|
|
- const ids = partIndexs.map(item => partList[item].getAttribute("id"))
|
|
|
+ let ids: any = [];
|
|
|
+ partIndexs.forEach(item => {
|
|
|
+ if (partList[item]) {
|
|
|
+ ids.push(partList[item]?.getAttribute("id"))
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if (visiblePartInfo) {
|
|
|
+ if (visiblePartInfo && ids.length) {
|
|
|
const id = visiblePartInfo.getAttribute("id");
|
|
|
Array.from(parts).forEach((part: any) => {
|
|
|
if (part && !ids.includes(part.getAttribute("id")) ) {
|