diff options
Diffstat (limited to 'lib/index.js')
| -rw-r--r-- | lib/index.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/index.js b/lib/index.js index ac9f634..03302c2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -92,12 +92,15 @@ function embedStyleMap(input, styleMap) { return docxStyleMap.writeStyleMap(docxFile, styleMap); }) .then(function(docxFile) { - return docxFile.toBuffer(); + return docxFile.toArrayBuffer(); }) - .then(function(buffer) { + .then(function(arrayBuffer) { return { + toArrayBuffer: function() { + return arrayBuffer; + }, toBuffer: function() { - return buffer; + return Buffer.from(arrayBuffer); } }; }); |
