fix: guard escapeYamlSingleQuote against undefined input

Default to empty string when value is undefined/null to prevent
replaceAll from throwing on missing CSV fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jheyworth 2026-02-09 00:55:55 +00:00
parent b7682d809e
commit 719fa3f731
1 changed files with 1 additions and 1 deletions

View File

@ -556,7 +556,7 @@ Type \`/bmad-\` in Copilot Chat to see all available BMAD workflows and agent ac
* @returns {string} Escaped string safe for YAML single-quoted context * @returns {string} Escaped string safe for YAML single-quoted context
*/ */
escapeYamlSingleQuote(value) { escapeYamlSingleQuote(value) {
return value.replaceAll("'", "''"); return (value || '').replaceAll("'", "''");
} }
/** /**