8
0
Piotr Jasiun 9 rokov pred
rodič
commit
1987f26020

+ 2 - 0
packages/ckeditor5-engine/src/treemodel/node.js

@@ -5,6 +5,8 @@
 
 'use strict';
 
+import Position from './position.js';
+
 import clone from '../../utils/lib/lodash/clone.js';
 import toMap from '../../utils/tomap.js';
 import CKEditorError from '../../utils/ckeditorerror.js';

+ 2 - 1
packages/ckeditor5-engine/src/treeview/attributeelement.js

@@ -6,6 +6,7 @@
 'use strict';
 
 import Element from './element.js';
+import ContainerElement from './containerelement.js';
 
 /**
  * Default attribute priority.
@@ -78,7 +79,7 @@ export default class AttributeElement extends Element {
 			return false;
 		}
 
-		const element = this.parent;
+		let element = this.parent;
 
 		// <p><b></b></p> needs filler -> <p><b><br></b></p>
 		while ( !( element instanceof ContainerElement ) ) {

+ 1 - 1
packages/ckeditor5-engine/src/treeview/observer/mutationobserver.js

@@ -113,7 +113,7 @@ export default class MutationObserver extends Observer {
 	 */
 	_onMutations( domMutations ) {
 		// As a result of this.flush() we can have an empty collection.
-		if ( domMutations.length == 0 ) {
+		if ( domMutations.length === 0 ) {
 			return;
 		}
 

+ 1 - 1
packages/ckeditor5-engine/src/treeview/observer/selectionobserver.js

@@ -30,7 +30,7 @@ export default class SelectionObserver extends Observer {
 			return;
 		}
 
-		domDocument.addEventListener( 'selectionchange', ( domEvent ) => {
+		domDocument.addEventListener( 'selectionchange', () => {
 			if ( !this.isEnabled ) {
 				return;
 			}

+ 3 - 1
packages/ckeditor5-engine/src/treeview/position.js

@@ -5,9 +5,11 @@
 
 'use strict';
 
-import compareArrays from '../../utils/comparearrays.js';
 import Text from './text.js';
 
+import compareArrays from '../../utils/comparearrays.js';
+import CKEditorError from '../../utils/ckeditorerror.js';
+
 /**
  * Position in the tree. Position is always located before or after a node.
  *