From 554e939ed6f3ce697fca925a333cb9fc14ccbe5a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 18 Apr 2013 20:07:23 +0100 Subject: Return Result from document-to-HTML conversion --- lib/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/index.js') 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; }); } -- cgit v1.2.3