guigrpa / docx-templates

Template-based docx report creation
MIT License
904 stars 146 forks source link

I unexpectedly got the error `ObjectCommandResultError` #308

Closed dnisanity closed 1 year ago

dnisanity commented 1 year ago

I got the error ObjectCommandResultError when call the object property in the docx template:

[FOR breach IN breaches] [INS $breach.number] [END-FOR breach]

I`m returning "breaches" array from the JS code: await createReport({ template, data: { breaches: [ { number: "2.1" }, { number: "2.2" } ] } })

I use the docx-template v4.11.1, node v14.18.1

jjhbw commented 1 year ago

Can you give me a reproducible example, including a template?