avoid null in toMarkdown

This commit is contained in:
David Tesler 2017-05-06 21:33:10 -07:00
parent bbeca84a41
commit c5df980e31
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# Medium to markdown
[![npm](https://img.shields.io/npm/v/medium-to-markdown.svg)](https://npmjs.com/package/medium-to-markdown)
[![npm](https://img.shields.io/npm/v/medium-to-markdown.svg)](https://npmjs.com/package/medium-to-markdown) [![npm](https://img.shields.io/npm/l/medium-to-markdown.svg)]()
This module lets you take a medium post and convert it to markdown.

View File

@ -18,7 +18,7 @@ function convertFromUrl(url) {
return reject(err);
let $ = cheerio.load(body);
let html = $('.postArticle-content').html();
let html = $('.postArticle-content').html() || '';
let markdown = toMarkdown(html, { gfm: true, converters: converters });
resolve(markdown);