Commit 625c004b authored by Vincent Massol's avatar Vincent Massol
Browse files

XRENDERING-658: Removing the top level paragraph when it has no children fails

* Remove unnecessary check (since getChildren() never returns null), thanks Thomas for noticing
parent 5e3f2d31
......@@ -50,9 +50,7 @@ public void removeTopLevelParagraph(List<Block> blocks)
// We only remove the paragraph if there's only one top level element and if it's a paragraph.
if ((blocks.size() == 1) && blocks.get(0) instanceof ParagraphBlock) {
Block paragraphBlock = blocks.remove(0);
if (paragraphBlock.getChildren() != null) {
blocks.addAll(0, paragraphBlock.getChildren());
blocks.addAll(0, paragraphBlock.getChildren());
// Remove parent block
for (Block block : blocks) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment