Browse Source

Remove internal function from the scope of the parent.

Maciej Gołaszewski 5 years ago
parent
commit
819c3c7864
1 changed files with 10 additions and 9 deletions
  1. 10 9
      packages/ckeditor5-list/src/liststyleediting.js

+ 10 - 9
packages/ckeditor5-list/src/liststyleediting.js

@@ -566,16 +566,17 @@ function getChangedListItems( changes ) {
 	}
 
 	return items;
+}
 
-	function getItemFromChange( change ) {
-		if ( change.type === 'attribute' ) {
-			return change.range.start.nodeAfter;
-		}
-
-		if ( change.type === 'insert' ) {
-			return change.position.nodeAfter;
-		}
+function getItemFromChange( change ) {
+	if ( change.type === 'attribute' ) {
+		return change.range.start.nodeAfter;
+	}
 
-		return null;
+	if ( change.type === 'insert' ) {
+		return change.position.nodeAfter;
 	}
+
+	return null;
 }
+