alert after paroles

This commit is contained in:
2025-10-20 10:03:36 +02:00
parent a0de26b41f
commit f9b478fe22
7 changed files with 59 additions and 32 deletions
@@ -203,9 +203,7 @@ const CreateLyricsWithAi = () => {
style: resolvedStyle,
audience: audience?.trim() ? audience.trim() : undefined,
structure:
(customStructure &&
parsedStructure &&
customStructure.length === parsedStructure.length
(Array.isArray(customStructure) && customStructure.length > 0
? customStructure
: parsedStructure) || undefined,
rhymes: rhymes || undefined,
@@ -284,11 +282,11 @@ const CreateLyricsWithAi = () => {
// sauter Rhymes et CreatingLyrics et aller directement sur Lyrics
if (hasLyrics && selectedIndex === 6) {
const chosenStructure =
(customStructure &&
parsedStructure &&
customStructure.length === parsedStructure.length
Array.isArray(customStructure) && customStructure.length > 0
? customStructure
: parsedStructure) || [];
: Array.isArray(parsedStructure)
? parsedStructure
: [];
await updateProjectData({
config: { structure: chosenStructure },
selections: {