From b8629592d4c7363ae223883b036c6fd4e17496c1 Mon Sep 17 00:00:00 2001 From: Barbara Valdez <34872381+barbaravaldez@users.noreply.github.com> Date: Sat, 9 Sep 2023 01:36:56 -0700 Subject: [PATCH] Fix some of the issues found in the bug bash (#24348) --- .../ui/serverPropertiesDialog.ts | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts b/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts index 4ddb5ab165..e803eaa073 100644 --- a/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts +++ b/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts @@ -597,8 +597,10 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { const newPath = await this.selectFolder(this.objectInfo.dataLocation); - this.dataLocationInput.value = newPath; - this.objectInfo.dataLocation = newPath; + if (newPath) { + this.dataLocationInput.value = newPath; + this.objectInfo.dataLocation = newPath; + } if (this.objectInfo.dataLocation !== this.originalObjectInfo.dataLocation) { this.shouldRestartServer = true; } @@ -613,8 +615,10 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { const newPath = await this.selectFolder(this.objectInfo.logLocation); - this.logLocationInput.value = newPath; - this.objectInfo.logLocation = newPath; + if (newPath) { + this.logLocationInput.value = newPath; + this.objectInfo.logLocation = newPath; + } if (this.objectInfo.logLocation !== this.originalObjectInfo.logLocation) { this.shouldRestartServer = true; } @@ -626,8 +630,10 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { const newPath = await this.selectFolder(this.objectInfo.backupLocation); - this.backupLocationInput.value = newPath; - this.objectInfo.backupLocation = newPath; + if (newPath) { + this.backupLocationInput.value = newPath; + this.objectInfo.backupLocation = newPath; + } }, isEnabled); const backupLocationInputContainer = this.createLabelInputContainer(localizedConstants.backupLocationText, [this.backupLocationInput, backupLocationButton]) @@ -706,7 +712,7 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { this.objectInfo.fullTextUpgradeOption = newValue; - }, this.viewInfo.fullTextUpgradeOptions, this.objectInfo.fullTextUpgradeOption); + }, this.viewInfo.fullTextUpgradeOptions, this.objectInfo.fullTextUpgradeOption, !!this.objectInfo.fullTextUpgradeOption); const fullTextUpgradeOptionContainer = this.createLabelInputContainer(localizedConstants.fullTextUpgradeOptionLabel, this.fullTextUpgradeOptionDropdown); this.maxTextReplicationSizeInput = this.createInputBox(async (newValue) => {