Browse Source

Changed: Simplification in BlockQuoteCommand implementation.

Szymon Cofalik 7 years ago
parent
commit
ece66cf7c7
1 changed files with 3 additions and 2 deletions
  1. 3 2
      packages/ckeditor5-block-quote/src/blockquotecommand.js

+ 3 - 2
packages/ckeditor5-block-quote/src/blockquotecommand.js

@@ -158,8 +158,9 @@ export default class BlockQuoteCommand extends Command {
 			let quote = findQuote( groupRange.start );
 
 			if ( !quote ) {
-				writer.wrap( groupRange, new Element( 'blockQuote' ) );
-				quote = groupRange.start.nodeAfter;
+				quote = new Element( 'blockQuote' );
+
+				writer.wrap( groupRange, quote );
 			}
 
 			quotesToMerge.push( quote );