draftjs-md-converter
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -265,3 +265,3 @@ 'use strict'; | ||
return children.reduce(function (prev, current) { | ||
return prev + current.value.length; | ||
return prev + (current.value ? current.value.length : 0); | ||
}, 0); | ||
@@ -268,0 +268,0 @@ }; |
{ | ||
"name": "draftjs-md-converter", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Converter for converting Draft.js state into Markdown and vice versa", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -86,3 +86,3 @@ 'use strict'; | ||
const getRawLength = children => | ||
children.reduce((prev, current) => prev + current.value.length, 0); | ||
children.reduce((prev, current) => prev + (current.value ? current.value.length : 0), 0); | ||
@@ -89,0 +89,0 @@ const addLink = child => { |
27332