evilc0des / docxtemplater-image-module-free

Open Source Image Module for docxtemplater
Other
52 stars 43 forks source link

No way to skip image variable and resolve it using nullGetter #6

Open ydanneg opened 3 years ago

ydanneg commented 3 years ago

Hi.

If i don't provide image data then lib fails because of this line https://github.com/evilc0des/docxtemplater-image-module-free/blob/master/es6/index.js#L101 original repo: https://github.com/edi9999/docxtemplater-image-module/blob/master/es6/index.js#L96 that actually set always undefined value. But the core expects a promise or null. I expected in this case to go through nullGetter callback to resolve null values.