From 7a69fe97883ae27c51437c400cc08861dfa02b3c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 1 Apr 2013 16:25:39 +0100 Subject: Preserve messages in Converter --- lib/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/index.js') diff --git a/lib/index.js b/lib/index.js index 83f1572..96ba751 100644 --- a/lib/index.js +++ b/lib/index.js @@ -19,7 +19,12 @@ function Converter(options) { Converter.prototype.convertToHtml = function(docxFile) { var documentConverter = this._documentConverter; return docxReader.read(docxFile) - .then(function(result) { - return documentConverter.convertToHtml(result.document); + .then(function(documentResult) { + return documentResult.mapThen(function(document) { + return documentConverter.convertToHtml(document); + }); + }).then(function(result) { + result.html = result.value.html; + return result; }); } -- cgit v1.2.3