fix: no current code caused code generation show error (#24086)

This commit is contained in:
Joel 2025-08-18 14:18:08 +08:00 committed by GitHub
parent 26d7654851
commit f5033c5a0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ export const GetCodeGeneratorResModal: FC<IGetCodeGeneratorResProps> = (
ideal_output: ideaOutput,
language: languageMap[codeLanguages] || 'javascript',
})
if(!currentCode)
res.modified = (res as any).code
if (error) {
Toast.notify({