Skip to content

Commit dccbf0a

Browse files
committed
Fixup after updating typescript-eslint to 8.44.0
Signed-off-by: Victor Rubezhny <[email protected]>
1 parent 76b94cf commit dccbf0a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/explorer.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -653,18 +653,22 @@ export class OpenShiftExplorer implements TreeDataProvider<ExplorerItem>, Dispos
653653
collections = await this.getPipelineTasks(element);
654654
break;
655655
default:
656-
try {
657-
collections = await Oc.Instance.getKubernetesObjects(element.kind, undefined, undefined, this.executionContext);
658-
} catch {
659-
collections = [ couldNotGetItem(element.kind, this.kubeConfigInfo.getEffectiveKubeConfig().getCluster(this.kubeContext.cluster)?.server) ];
660-
}
656+
collections = await Oc.Instance.getKubernetesObjects(
657+
element.kind, undefined, undefined, this.executionContext
658+
).catch(() => Promise.resolve([
659+
couldNotGetItem(
660+
element.kind,
661+
this.kubeConfigInfo.getEffectiveKubeConfig().getCluster(this.kubeContext.cluster)?.server
662+
)
663+
]));
661664
break;
662665
}
663666
const toCollect = [
664-
collections,
667+
Promise.resolve(collections),
665668
...collectableServices
666669
.map(serviceKind => Oc.Instance.getKubernetesObjects(serviceKind.name, undefined, undefined, this.executionContext))
667670
];
671+
668672
result = await Promise.all(toCollect).then(listOfLists => listOfLists.flatMap(a => a as ExplorerItem[]));
669673
}
670674
if (!element) {

0 commit comments

Comments
 (0)