Merge pull request #697 from samhvw8/fix/config-profile-rename-bug

fix: prevent unnecessary config operations when renaming to same name
This commit is contained in:
Matt Rubens
2025-01-31 23:04:02 -05:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -60,6 +60,11 @@ const ApiConfigManager = ({
if (editState === "new") {
onUpsertConfig(trimmedValue)
} else if (editState === "rename" && currentApiConfigName) {
if (currentApiConfigName === trimmedValue) {
setEditState(null)
setInputValue("")
return
}
onRenameConfig(currentApiConfigName, trimmedValue)
}