aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index ad7ad69..c477dad 100644
--- a/README.md
+++ b/README.md
@@ -143,7 +143,9 @@ mammoth.convertToHtml({path: "path/to/document.docx"})
var html = result.value; // The generated HTML
var messages = result.messages; // Any messages, such as warnings during conversion
})
- .done();
+ .catch(function(error) {
+ console.error(error);
+ });
```
Note that `mammoth.convertToHtml` returns a [promise](http://promises-aplus.github.io/promises-spec/).
@@ -158,7 +160,9 @@ mammoth.extractRawText({path: "path/to/document.docx"})
var text = result.value; // The raw text
var messages = result.messages;
})
- .done();
+ .catch(function(error) {
+ console.error(error);
+ });
```
#### Custom style map