Skip to content

Commit

Permalink
Fix decoding text ranges for slate when no marks
Browse files Browse the repository at this point in the history
  • Loading branch information
SamyPesse committed Aug 8, 2016
1 parent 39c17b2 commit e9b1f25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/slate/decode.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var BLOCKS = require('../constants/blocks');
function decodeTextRange(range) {
var base = Token.createText(range.text);

return range.marks
return (range.marks || [])
.reduce(function(inner, mark) {
return Token.create(mark.type, {
tokens: [inner],
Expand Down

0 comments on commit e9b1f25

Please sign in to comment.