fix: handle undefined answer in buildMdFromAnswer

This commit is contained in:
Han Xiao 2025-06-11 22:47:38 -07:00
parent 630f685cb6
commit 0922c64022

View File

@ -6,7 +6,7 @@ import { logInfo, logError, logDebug, logWarning } from '../logging';
export function buildMdFromAnswer(answer: AnswerAction): string {
return repairMarkdownFootnotes(answer.answer, answer.references);
return repairMarkdownFootnotes(answer.answer || answer.mdAnswer || '', answer.references);
}
export function repairMarkdownFootnotes(