diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-09-12 14:02:49 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-09-12 14:02:49 +0100 |
| commit | a4afe3c01c1035f8da490503917c419e1aa2eb5a (patch) | |
| tree | 5ed837f437cca44684d7c3c07802d8acc61c9e50 /lib | |
| parent | a34fb36159d9369aec9171a0036b687abb88541f (diff) | |
Fix race condition
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/index.js b/lib/index.js index 69ab111..ae95371 100644 --- a/lib/index.js +++ b/lib/index.js @@ -96,9 +96,10 @@ function convertElementToRawText(element) { function embedStyleMap(input, styleMap) { return unzip.openZip(input) + .tap(function(docxFile) { + return docxStyleMap.writeStyleMap(docxFile, styleMap); + }) .then(function(docxFile) { - docxStyleMap.writeStyleMap(docxFile, styleMap); - return { toBuffer: docxFile.toBuffer }; |
