We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad647f6 commit 5ac6307Copy full SHA for 5ac6307
src/openshift/openshiftItem.ts
@@ -94,7 +94,7 @@ export abstract class OpenShiftItem {
94
95
static async getApplicationNames(project: OpenShiftObject, createCommand: boolean = false): Promise<(OpenShiftObject | QuickPickCommand)[]> {
96
const applicationList: Array<OpenShiftObject> = await OpenShiftItem.odo.getApplications(project);
97
- if (applicationList.length === 0) throw Error(errorMessage.Component);
+ if (applicationList.length === 0 && !createCommand) throw Error(errorMessage.Component);
98
return createCommand ? [new QuickPickCommand(`$(plus) Create new Application...`, async () => {
99
return await OpenShiftItem.getName('Application name', applicationList);
100
}), ...applicationList] : applicationList;
0 commit comments