Remove unnecessary cfgPrompt null-chains

We already check if cfgPrompt exists.
This commit is contained in:
valadaptive 2024-04-25 08:49:25 -04:00
parent 8ca83bb255
commit 2d0767306e

View File

@ -3805,8 +3805,8 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
cfgPrompt = getCfgPrompt(cfgGuidanceScale, isNegative);
}
if (cfgPrompt && cfgPrompt?.value) {
if (cfgPrompt?.depth === 0) {
if (cfgPrompt && cfgPrompt.value) {
if (cfgPrompt.depth === 0) {
finalMesSend[finalMesSend.length - 1].message +=
/\s/.test(finalMesSend[finalMesSend.length - 1].message.slice(-1))
? cfgPrompt.value