Explorar o código

Code style changes in selection-post-fixer.

Co-Authored-By: jodator <jodator@gmail.com>
Szymon Cofalik %!s(int64=7) %!d(string=hai) anos
pai
achega
d73e98ecbd

+ 1 - 1
packages/ckeditor5-engine/src/model/utils/selection-post-fixer.js

@@ -190,7 +190,7 @@ function tryFixingNonCollapsedRage( range, schema ) {
  			const fixedStart = isStartObject ? start : schema.getNearestSelectionRange( start, 'forward' ).start;
 
 			const isEndObject = end.nodeBefore && schema.isObject( end.nodeBefore );
-			const fixedEnd = isEndObject ? null : schema.getNearestSelectionRange( end, 'backward' );
+ 			const fixedEnd = isEndObject ? end : schema.getNearestSelectionRange( end, 'backward' ).end;
 
 			return new Range( fixedStart ? fixedStart.start : start, fixedEnd ? fixedEnd.start : end );
 		}