8
0
Просмотр исходного кода

Internal: Adjusted engine's method use to its changes.

Piotrek Koszuliński 8 лет назад
Родитель
Сommit
5c96bbbf62
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/ckeditor5-image/src/imagecaption/imagecaptionengine.js

+ 1 - 1
packages/ckeditor5-image/src/imagecaption/imagecaptionengine.js

@@ -235,7 +235,7 @@ function insertViewCaptionAndBind( viewCaption, modelCaption, viewImage, mapper
  * @returns {module:engine/model/element~Element|null}
  */
 function getParentCaption( node ) {
-	const ancestors = node.getAncestors( { includeNode: true } );
+	const ancestors = node.getAncestors( { includeSelf: true } );
 	const caption = ancestors.find( ancestor => ancestor.name == 'caption' );
 
 	if ( caption && caption.parent && caption.parent.name == 'image' ) {