Browse Source

Merge pull request #481 from monotykamary/fix/noop-on-no-renames

fix: avoid deleting configs if the currentApiConfigName is the same
Matt Rubens 11 months ago
parent
commit
21c7ac7046
1 changed files with 3 additions and 1 deletions
  1. 3 1
      webview-ui/src/components/settings/ApiConfigManager.tsx

+ 3 - 1
webview-ui/src/components/settings/ApiConfigManager.tsx

@@ -58,7 +58,9 @@ const ApiConfigManager = ({
 		if (editState === "new") {
 			onUpsertConfig(trimmedValue)
 		} else if (editState === "rename" && currentApiConfigName) {
-			onRenameConfig(currentApiConfigName, trimmedValue)
+			if (currentApiConfigName !== trimmedValue) {
+				onRenameConfig(currentApiConfigName, trimmedValue)
+			}
 		}
 
 		setEditState(null)