diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-18 20:07:23 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-18 20:07:23 +0100 |
| commit | 554e939ed6f3ce697fca925a333cb9fc14ccbe5a (patch) | |
| tree | a777f5c2fb2b67066196951a7d954c16c6ba12fd /lib/index.js | |
| parent | 58d57f995fcf2077c3c4147dfc637cb1759de98b (diff) | |
Return Result from document-to-HTML conversion
Diffstat (limited to 'lib/index.js')
| -rw-r--r-- | lib/index.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/index.js b/lib/index.js index fb734e6..2a772bb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -20,11 +20,8 @@ Converter.prototype.convertToHtml = function(inputOptions) { var documentConverter = this._documentConverter; return docxReader.read(inputOptions) .then(function(documentResult) { - return documentResult.mapThen(function(document) { + return documentResult.flatMapThen(function(document) { return documentConverter.convertToHtml(document); }); - }).then(function(result) { - result.html = result.value.html; - return result; }); } |
