shunkosa / sfdx-flowdoc-plugin

A Salesforce CLI plugin that generates design document from Lightning Flow (currently Process Builder) metadata
https://flowdoc.herokuapp.com
65 stars 15 forks source link

Exception when generating a Word document #19

Open CloudTechRaz opened 3 years ago

CloudTechRaz commented 3 years ago

Seems that when dealing with long text in a PB (e.g. large formula) the generated table doesn't fit the allocated Word page size resulting in the following error:

TypeError: Cannot read property 'border' of undefined
    at new Paragraph (/app/node_modules/docx/build/index.js:16382:29)
    at /app/node_modules/sfdx-flowdoc-plugin/lib/lib/docx/process/docxTableUtils.js:140:32
    at Array.forEach (<anonymous>)
    at Object.createProcessParameterTable (/app/node_modules/sfdx-flowdoc-plugin/lib/lib/docx/process/docxTableUtils.js:124:10)
    at DocxProcessFormatter.buildActionTables (/app/node_modules/sfdx-flowdoc-plugin/lib/lib/docx/process/docxProcessFormatter.js:171:45)
    at DocxProcessFormatter.buildActionContents (/app/node_modules/sfdx-flowdoc-plugin/lib/lib/docx/process/docxProcessFormatter.js:123:35)
    at /app/node_modules/sfdx-flowdoc-plugin/lib/lib/docx/process/docxProcessFormatter.js:81:53
    at Array.forEach (<anonymous>)
    at DocxProcessFormatter.prepareActionGroups (/app/node_modules/sfdx-flowdoc-plugin/lib/lib/docx/process/docxProcessFormatter.js:75:45)
    at buildDocxContent (/app/node_modules/sfdx-flowdoc-plugin/lib/lib/docx/docxBuilder.js:24:25)