8
0
Просмотр исходного кода

Simplified the private API of `DeleteCommand#_shouldEntireContentBeReplacedWithParagraph()` method.

Kamil Piechaczek 8 лет назад
Родитель
Сommit
879ad461c0
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      packages/ckeditor5-typing/src/deletecommand.js

+ 3 - 3
packages/ckeditor5-typing/src/deletecommand.js

@@ -78,7 +78,7 @@ export default class DeleteCommand extends Command {
 			if ( selection.isCollapsed ) {
 			if ( selection.isCollapsed ) {
 				const sequence = options.sequence || 1;
 				const sequence = options.sequence || 1;
 
 
-				if ( this._shouldEntireContentBeReplacedWithParagraph( { sequence } ) ) {
+				if ( this._shouldEntireContentBeReplacedWithParagraph( sequence ) ) {
 					this._replaceEntireContentWithParagraph();
 					this._replaceEntireContentWithParagraph();
 				}
 				}
 
 
@@ -115,9 +115,9 @@ export default class DeleteCommand extends Command {
 	 * @param {Number} sequence A number describing which subsequent delete event it is without the key being released.
 	 * @param {Number} sequence A number describing which subsequent delete event it is without the key being released.
 	 * @returns {Boolean}
 	 * @returns {Boolean}
 	 */
 	 */
-	_shouldEntireContentBeReplacedWithParagraph( options ) {
+	_shouldEntireContentBeReplacedWithParagraph( sequence ) {
 		// Does nothing if user pressed and held the "Backspace" or "Delete" key.
 		// Does nothing if user pressed and held the "Backspace" or "Delete" key.
-		if ( options.sequence > 1 ) {
+		if ( sequence > 1 ) {
 			return false;
 			return false;
 		}
 		}