Browse Source

Fix inlineHighlight() after is() API change.

Maciej Gołaszewski 5 years ago
parent
commit
06c8992d96
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/ckeditor5-typing/src/utils/inlinehighlight.js

+ 1 - 1
packages/ckeditor5-typing/src/utils/inlinehighlight.js

@@ -55,7 +55,7 @@ export default function inlineHighlight( editor, attributeName, tagName, classNa
 			// There might be multiple view elements in the `viewRange`, for example, when the `a` element is
 			// There might be multiple view elements in the `viewRange`, for example, when the `a` element is
 			// broken by a UIElement.
 			// broken by a UIElement.
 			for ( const item of viewRange.getItems() ) {
 			for ( const item of viewRange.getItems() ) {
-				if ( item.is( tagName ) && !item.hasClass( className ) ) {
+				if ( item.is( 'element', tagName ) && !item.hasClass( className ) ) {
 					writer.addClass( className, item );
 					writer.addClass( className, item );
 					highlightedElements.add( item );
 					highlightedElements.add( item );
 					changed = true;
 					changed = true;