8
0
Pārlūkot izejas kodu

Changed name of the variable in loop (in order to avoid expressions like "item.item").

Kamil Piechaczek 8 gadi atpakaļ
vecāks
revīzija
6dc7f65567

+ 4 - 4
packages/ckeditor5-engine/src/model/liveselection.js

@@ -565,16 +565,16 @@ export default class LiveSelection extends Selection {
 			const range = this.getFirstRange();
 
 			// ...look for a first character node in that range and take attributes from it.
-			for ( const item of range ) {
+			for ( const value of range ) {
 				// If the item is an object, we don't want to get attributes from its children.
-				if ( item.item.is( 'element' ) && schema.objects.has( item.item.name ) ) {
+				if ( value.item.is( 'element' ) && schema.objects.has( value.item.name ) ) {
 					break;
 				}
 
 				// This is not an optimal solution because of https://github.com/ckeditor/ckeditor5-engine/issues/454.
 				// It can be done better by using `break;` instead of checking `attrs === null`.
-				if ( item.type == 'text' && attrs === null ) {
-					attrs = item.item.getAttributes();
+				if ( value.type == 'text' && attrs === null ) {
+					attrs = value.item.getAttributes();
 				}
 			}
 		} else {