Fix undefined reasoning append on continue

cc7355358db9879035080dfc86f0cf8d548d2c01

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +9 -0Ignore whitespace
public/script.js+9 -0
@@ -5927,6 +5927,15 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes,
5927 chat[chat.length - 1]['extra'] = {};5927 chat[chat.length - 1]['extra'] = {};
5928 }5928 }
59295929
5930 // Coerce null/undefined to empty string
5931 if (!chat[chat.length - 1]['extra']['reasoning']) {
5932 chat[chat.length - 1]['extra']['reasoning'] = '';
5933 }
5934
5935 if (!reasoning) {
5936 reasoning = '';
5937 }
5938
5930 let oldMessage = '';5939 let oldMessage = '';
5931 const generationFinished = new Date();5940 const generationFinished = new Date();
5932 const img = extractImageFromMessage(getMessage);5941 const img = extractImageFromMessage(getMessage);