Split if condition

9250be348de9d275c94ff21971982747e3f466bc

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

1 files changed, +5 -3Ignore whitespace
public/script.js+5 -3
@@ -3198,10 +3198,12 @@ class StreamingProcessor {
31983198 chat[messageId]['extra'] = {};
31993199 }
32003200
32013201 if (this.reasoning && this.messageReasoningDom instanceof HTMLElement) {
32023202 chat[messageId]['extra']['reasoning'] = this.reasoning;
3203- const formattedReasoning = messageFormatting(this.reasoning, '', false, false, -1);
3203+ if (this.messageReasoningDom instanceof HTMLElement) {
3204- this.messageReasoningDom.innerHTML = formattedReasoning;
3204+ const formattedReasoning = messageFormatting(this.reasoning, '', false, false, -1);
3205+ this.messageReasoningDom.innerHTML = formattedReasoning;
3206+ }
32053207 }
32063208
32073209 if (currentTokenCount) {