Преглед изворни кода

Aligned this PR to the changes done in the meantime on master.

Piotrek Koszuliński пре 8 година
родитељ
комит
c34c5a9f45
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      packages/ckeditor5-engine/src/model/delta/basic-transformations.js

+ 2 - 2
packages/ckeditor5-engine/src/model/delta/basic-transformations.js

@@ -141,7 +141,7 @@ addTransformationCase( MarkerDelta, RenameDelta, transformMarkerDelta );
 
 
 // Add special case for MoveDelta x MergeDelta transformation.
 // Add special case for MoveDelta x MergeDelta transformation.
 addTransformationCase( MoveDelta, MergeDelta, ( a, b, context ) => {
 addTransformationCase( MoveDelta, MergeDelta, ( a, b, context ) => {
-	const undoMode = context.aWasUndone || context.bWasUndone;
+	const undoMode = context.undoMode;
 
 
 	// Do not apply special transformation case in undo mode or if `MergeDelta` has `NoOperation` as the second operation.
 	// Do not apply special transformation case in undo mode or if `MergeDelta` has `NoOperation` as the second operation.
 	if ( undoMode || !b.position ) {
 	if ( undoMode || !b.position ) {
@@ -187,7 +187,7 @@ addTransformationCase( MergeDelta, InsertDelta, ( a, b, context ) => {
 
 
 // Add special case for MergeDelta x MoveDelta transformation.
 // Add special case for MergeDelta x MoveDelta transformation.
 addTransformationCase( MergeDelta, MoveDelta, ( a, b, context ) => {
 addTransformationCase( MergeDelta, MoveDelta, ( a, b, context ) => {
-	const undoMode = context.aWasUndone || context.bWasUndone;
+	const undoMode = context.undoMode;
 
 
 	// Do not apply special transformation case in undo mode or if `MergeDelta` has `NoOperation` as the second operation.
 	// Do not apply special transformation case in undo mode or if `MergeDelta` has `NoOperation` as the second operation.
 	if ( undoMode || !a.position ) {
 	if ( undoMode || !a.position ) {