guigrpa / docx-templates

Template-based docx report creation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I unexpectedly got the error `ObjectCommandResultError`

dnisanity opened this issue · comments

commented

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

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