Skip to content

Commit f631e05

Browse files
committed
🐛 Fixed the issue of "no response when clicking the button in the Modify Custom Model window" #996
1 parent 0d07ad1 commit f631e05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/app/[locale]/setup/modelSetup/components/model/ModelDeleteDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ export const ModelDeleteDialog = ({
341341
<Button key="close" onClick={handleClose}>
342342
{t('common.button.close')}
343343
</Button>,
344-
// Only show confirm button for silicon and openai sources, not for OpenAI-API-Compatible
345-
(selectedSource !== "OpenAI-API-Compatible") && (
344+
// Only show confirm button when displaying model details (silicon and openai sources)
345+
(selectedSource && selectedSource !== "OpenAI-API-Compatible" && deletingModelType) && (
346346
<Button key="confirm" type="primary" loading={isConfirmLoading} onClick={async () => {
347347
setIsConfirmLoading(true)
348348
try {

0 commit comments

Comments
 (0)