mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): edge case with getViewModeChunks
This commit is contained in:
parent
8ca57d03d8
commit
96db006c99
@ -11,7 +11,7 @@ export const getViewModeChunks = (currentPrompt: string, presetPrompt?: string):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, we split the preset prompt into 3 parts: before, current, and after the placeholder
|
// Otherwise, we split the preset prompt into 3 parts: before, current, and after the placeholder
|
||||||
const [before, after] = presetPrompt.split(PRESET_PLACEHOLDER, 2);
|
const [before, ...after] = presetPrompt.split(PRESET_PLACEHOLDER);
|
||||||
|
|
||||||
return [before || '', currentPrompt, after || ''];
|
return [before || '', currentPrompt, after.join(PRESET_PLACEHOLDER) || ''];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user