Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pdf generation breaks on the new Optional template blocks #294

Closed
jeromesimeon opened this issue Aug 22, 2020 · 1 comment
Closed

Pdf generation breaks on the new Optional template blocks #294

jeromesimeon opened this issue Aug 22, 2020 · 1 comment
Assignees
Labels

Comments

@jeromesimeon
Copy link
Member

jeromesimeon commented Aug 22, 2020

Describe the bug
Pdf generation fails when applied to a CiceroMark containing Optional nodes.

To Reproduce
Steps to reproduce the behavior:

  1. Open the attached zip, containing a sample/template and corresponding data and CiceroMark
  2. Call the transform with: markus transform --from ciceromark_parsed --to pdf --input ciceromark_parsed.json
    3.See error:
bash-3.2$ markus transform --from ciceromark_parsed --to pdf --input cm.json 
(node:19761) UnhandledPromiseRejectionWarning: Error: Unhandled type Optional
    at ToPdfMakeVisitor.visit (/Users/jeromesimeon/.nvm/versions/node/v10.22.0/lib/node_modules/@accordproject/markdown-cli/node_modules/@accordproject/markdown-pdf/lib/ToPdfMakeVisitor.js:302:15)
    at ValidatedConcept.accept (/Users/jeromesimeon/.nvm/versions/node/v10.22.0/lib/node_modules/@accordproject/markdown-cli/node_modules/@accordproject/concerto-core/lib/model/typed.js:57:24)
    at nodes.forEach.node (/Users/jeromesimeon/.nvm/versions/node/v10.22.0/lib/node_modules/@accordproject/markdown-cli/node_modules/@accordproject/markdown-pdf/lib/ToPdfMakeVisitor.js:143:12)
    at Array.forEach (<anonymous>)

Expected behavior
Properly renders to pdf.

Attached zip

optionals.zip

@jeromesimeon
Copy link
Member Author

Fixed in #296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant