diff --git a/packages/vsce/src/trees/CICSCombinedLocalFileTree.ts b/packages/vsce/src/trees/CICSCombinedLocalFileTree.ts index 12f4bfbc..27dcebef 100644 --- a/packages/vsce/src/trees/CICSCombinedLocalFileTree.ts +++ b/packages/vsce/src/trees/CICSCombinedLocalFileTree.ts @@ -111,6 +111,7 @@ export class CICSCombinedLocalFileTree extends TreeItem { public addLocalFilesUtil(newChildren: (CICSLocalFileTreeItem | ViewMore)[], allLocalFiles: any, count: number | undefined) { for (const localfile of allLocalFiles) { const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0]; + if (regionsContainer == null) { continue; } const parentRegion = regionsContainer .getChildren() .filter((child) => child instanceof CICSRegionTree && child.getRegionName() === localfile.eyu_cicsname)?.[0]; diff --git a/packages/vsce/src/trees/CICSCombinedProgramTree.ts b/packages/vsce/src/trees/CICSCombinedProgramTree.ts index bf8adc04..991726a0 100644 --- a/packages/vsce/src/trees/CICSCombinedProgramTree.ts +++ b/packages/vsce/src/trees/CICSCombinedProgramTree.ts @@ -113,6 +113,7 @@ export class CICSCombinedProgramTree extends TreeItem { for (const program of allPrograms) { // Regions container must exist if all programs tree exists const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0]; + if (regionsContainer == null) { continue; } const parentRegion = regionsContainer .getChildren() .filter((child) => child instanceof CICSRegionTree && child.getRegionName() === program.eyu_cicsname)?.[0]; diff --git a/packages/vsce/src/trees/CICSCombinedTransactionTree.ts b/packages/vsce/src/trees/CICSCombinedTransactionTree.ts index 273fd04a..d14ce5b3 100644 --- a/packages/vsce/src/trees/CICSCombinedTransactionTree.ts +++ b/packages/vsce/src/trees/CICSCombinedTransactionTree.ts @@ -112,6 +112,7 @@ export class CICSCombinedTransactionsTree extends TreeItem { public addLocalTransactionsUtil(newChildren: (CICSTransactionTreeItem | ViewMore)[], allLocalTransactions: any, count: number | undefined) { for (const transaction of allLocalTransactions) { const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0]; + if (regionsContainer == null) { continue; } const parentRegion = regionsContainer .getChildren() .filter((child) => child instanceof CICSRegionTree && child.getRegionName() === transaction.eyu_cicsname)?.[0]; diff --git a/packages/vsce/src/utils/webviewHTML.ts b/packages/vsce/src/utils/webviewHTML.ts index 4409784b..059f4c0c 100644 --- a/packages/vsce/src/utils/webviewHTML.ts +++ b/packages/vsce/src/utils/webviewHTML.ts @@ -124,10 +124,10 @@ export const addProfileHtml = (message?: IUpdateProfile) => {