diff --git a/ui/litellm-dashboard/src/components/view_key_table.tsx b/ui/litellm-dashboard/src/components/view_key_table.tsx index 4f3238806..0595e31fd 100644 --- a/ui/litellm-dashboard/src/components/view_key_table.tsx +++ b/ui/litellm-dashboard/src/components/view_key_table.tsx @@ -762,6 +762,10 @@ const ViewKeyTable: React.FC = ({ return; } + if (selectedToken == null) { + return; + } + try { const formValues = await regenerateForm.validateFields(); const response = await regenerateKeyCall(accessToken, selectedToken.token, formValues);