mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
fix(mcp_servers): only consume openUserFields deep-link param once target is matched
Previously the param was stripped from the URL on the first effect run even when the target server was not yet present in serversWithHealth, so a later re-render with the populated list could not re-open the modal. Move the URL cleanup back inside the matched-target branch so the deep link is consumed exactly when the modal is opened.
This commit is contained in:
parent
5403fbbbb1
commit
366be211c1
1 changed files with 2 additions and 3 deletions
|
|
@ -99,9 +99,8 @@ const MCPServers: React.FC<MCPServerProps> = ({ accessToken, userRole, userID })
|
|||
const targetId = params.get("openUserFields");
|
||||
if (!targetId) return;
|
||||
const target = serversWithHealth.find((s) => s.server_id === targetId);
|
||||
if (target) {
|
||||
setUserFieldsServer(target);
|
||||
}
|
||||
if (!target) return;
|
||||
setUserFieldsServer(target);
|
||||
params.delete("openUserFields");
|
||||
const remaining = params.toString();
|
||||
const newUrl =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue