Skip to content

Commit

Permalink
Fix format block forgotten parameter addition
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Pulges committed Nov 10, 2015
1 parent 230011f commit 7e707a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/formatBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@
// Add line break before if needed
if (children.length > 0) {
if (
(fragment.lastChild && (fragment.lastChild.nodeType !== 1 || !isLineBreaking(fragment.lastChild))) ||
(!fragment.lastChild && prevNode && (prevNode.nodeType !== 1 || isLineBreaking(prevNode)))
(fragment.lastChild && (fragment.lastChild.nodeType !== 1 || !isLineBreaking(fragment.lastChild, composer))) ||
(!fragment.lastChild && prevNode && (prevNode.nodeType !== 1 || isLineBreaking(prevNode, composer)))
){
fragment.appendChild(composer.doc.createElement('BR'));
}
Expand All @@ -438,7 +438,7 @@

// Add line break after if needed
if (children.length > 0) {
if (fragment.lastChild.nodeType !== 1 || !isLineBreaking(fragment.lastChild)) {
if (fragment.lastChild.nodeType !== 1 || !isLineBreaking(fragment.lastChild, composer)) {
if (nextNode || fragment.lastChild !== content.lastChild) {
fragment.appendChild(composer.doc.createElement('BR'));
}
Expand Down

0 comments on commit 7e707a2

Please sign in to comment.