diff --git a/serviceconnector/src/createLinker/LinkerCreateStep.ts b/serviceconnector/src/createLinker/LinkerCreateStep.ts index 684e844330..81e9e91d4f 100644 --- a/serviceconnector/src/createLinker/LinkerCreateStep.ts +++ b/serviceconnector/src/createLinker/LinkerCreateStep.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, GenericTreeItem, nonNullProp, randomUtils } from "@microsoft/vscode-azext-utils"; +import { AzureWizardExecuteStep, GenericTreeItem, nonNullProp, nonNullValueAndProp, randomUtils } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import { TargetServiceTypeName } from "../../constants"; import { createLinkerClient } from "../linkerClient"; @@ -45,11 +45,11 @@ export class LinkerCreateStep extends AzureWizardExecuteStep{ public async prompt(context: ICreateLinkerContext): Promise { context.linkerName = await context.ui.showInputBox({ prompt: vscode.l10n.t('Enter a name for the connection'), - value: nonNullProp(nonNullProp(context, 'targetServiceType'), 'name') + '_' + randomUtils.getRandomHexString(5), + value: nonNullValueAndProp(context.targetServiceType, 'name') + '_' + randomUtils.getRandomHexString(5), validateInput: this.validateInput }); }