Fix rendering of messages without extra object
| @@ -181,8 +181,11 @@ export class ReasoningHandler { | ||
| 181 | 181 | : $(messageIdOrElement)[0]; |
| 182 | 182 | const messageId = Number(messageElement.getAttribute('mesid')); |
| 183 | 183 | |
| 184 | 184 | if (isNaN(messageId) || !chat[messageId]) return; |
| 185 | 185 | |
| 186 | + if (!chat[messageId].extra) { | |
| 187 | + chat[messageId].extra = {}; | |
| 188 | + } | |
| 186 | 189 | const extra = chat[messageId].extra; |
| 187 | 190 | |
| 188 | 191 | if (extra.reasoning) { |