Skip to content

Commit 5ac6307

Browse files
committed
Error should be thrown only when '+' command for app is disabled
1 parent ad647f6 commit 5ac6307

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openshift/openshiftItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export abstract class OpenShiftItem {
9494

9595
static async getApplicationNames(project: OpenShiftObject, createCommand: boolean = false): Promise<(OpenShiftObject | QuickPickCommand)[]> {
9696
const applicationList: Array<OpenShiftObject> = await OpenShiftItem.odo.getApplications(project);
97-
if (applicationList.length === 0) throw Error(errorMessage.Component);
97+
if (applicationList.length === 0 && !createCommand) throw Error(errorMessage.Component);
9898
return createCommand ? [new QuickPickCommand(`$(plus) Create new Application...`, async () => {
9999
return await OpenShiftItem.getName('Application name', applicationList);
100100
}), ...applicationList] : applicationList;

0 commit comments

Comments
 (0)