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

Fix reading template images in the browser #1384

Merged
merged 1 commit into from
Jan 20, 2022
Merged

Fix reading template images in the browser #1384

merged 1 commit into from
Jan 20, 2022

Conversation

simonbrunel
Copy link
Contributor

Media.addMedia() supports both node Buffer and ArrayBuffer, so check if we are running in the browser and use ArrayBuffer, instead of node Buffer, so we don't need to rely on a node buffer polyfill as described in my comment.

Fix #1272

@dolanmiu dolanmiu merged commit 9cbb307 into dolanmiu:master Jan 20, 2022
@simonbrunel simonbrunel deleted the fix/template-images-browser branch January 21, 2022 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nodebuffer is not supported by this platform while using docxjs with javascript (not nodejs/react/vuejs).
2 participants