Przeglądaj źródła

Removed an if condition which is not necessary. Selection is being fixed after applying operation so it is always correct.

Kamil Piechaczek 7 lat temu
rodzic
commit
ee8466a8bd

+ 1 - 4
packages/ckeditor5-engine/src/model/documentselection.js

@@ -512,10 +512,7 @@ class LiveSelection extends Selection {
 			while ( this._fixGraveyardRangesData.length ) {
 				const { liveRange, sourcePosition } = this._fixGraveyardRangesData.shift();
 
-				// Checks whether the `liveRange` is still inside the graveyard.
-				if ( liveRange.root == this._document.graveyard ) {
-					this._fixGraveyardSelection( liveRange, sourcePosition );
-				}
+				this._fixGraveyardSelection( liveRange, sourcePosition );
 			}
 
 			if ( this._hasChangedRange ) {